style<DataGrid, ListView>: remove default FocusVisualStyle

This commit is contained in:
leo 2021-04-08 11:00:37 +08:00
parent 245084fd34
commit c7f9d249ed
2 changed files with 4 additions and 1 deletions

View file

@ -3,6 +3,8 @@
<Style x:Key="Style.DataGridCell" TargetType="{x:Type DataGridCell}"> <Style x:Key="Style.DataGridCell" TargetType="{x:Type DataGridCell}">
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsSelected" Value="true"> <Trigger Property="IsSelected" Value="true">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" /> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />

View file

@ -3,6 +3,7 @@
<Style x:Key="Style.ListViewItem.Borderless" TargetType="{x:Type ListViewItem}"> <Style x:Key="Style.ListViewItem.Borderless" TargetType="{x:Type ListViewItem}">
<Setter Property="Padding" Value="2"/> <Setter Property="Padding" Value="2"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SnapsToDevicePixels" Value="true"/> <Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>