MaterialDesignInXAML/MaterialDesignInXamlToolkit

Scale transforms do not render consistently

開放

#1,064 建立於 2018年10月10日

 (1 則留言) (1 個反應) (0 位負責人)C# (3,500 個分叉)batch import
Hacktoberfestbug

倉庫指標

星標
 (16,143 顆星)
PR 合併指標
 (平均合併 2天 7小時) (30 天內合併 9 個 PR)

描述

Reproduction steps: Apply a ScaleTransform to the ContentControl in the MainWindow of the demo app.

<ContentControl Content="{Binding ElementName=DemoItemsListBox, Path=SelectedItem.Content}">
    <ContentControl.LayoutTransform>
        <ScaleTransform ScaleX="1.3" ScaleY="1.3" />
    </ContentControl.LayoutTransform>
</ContentControl>

The problem can be observed with most of the controls that have fine lines. ComboBox and TextBox both use the Underline control, and Slider is another obvious one. The issue is that the rendered thickness of these lines is inconsistent.

This problem is typically resolved with the UseLayoutRounding and SnapToDevicePixels

The "fix" for this may be partially or fully in the demo application, in which case those changes should be documented here.

image image image

貢獻者指南