style<*>: enable RenderOptions.ClearTypeHint for all ContextMenus/DataGrid/Tree

This commit is contained in:
leo 2021-07-30 13:25:01 +08:00
parent f7f2bf3eee
commit 24a61dbef8
3 changed files with 6 additions and 3 deletions

View file

@ -7,6 +7,9 @@
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
</Style>
<Style TargetType="{x:Type ContextMenu}">
@ -14,9 +17,7 @@
<Setter Property="Grid.IsSharedSizeScope" Value="False" />
<Setter Property="HorizontalOffset" Value="-4"/>
<Setter Property="VerticalOffset" Value="-4"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
<Setter Property="TextElement.FontSize" Value="9pt"/>
<Setter Property="TextElement.FontSize" Value="13"/>
<Setter Property="Template">
<Setter.Value>

View file

@ -15,6 +15,7 @@
<Style x:Key="Style.DataGridRow" TargetType="{x:Type DataGridRow}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">

View file

@ -28,6 +28,7 @@
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, Mode=OneWay, FallbackValue=Stretch, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, Mode=OneWay, FallbackValue=Center, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:TreeItem}">