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}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
@ -23,7 +25,7 @@
<Style x:Key="Style.DataGridRow" TargetType="{x:Type DataGridRow}">
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource Brush.Accent2}"/>

View file

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