refactor: 更改解析页DataGrid选中行高亮颜色

This commit is contained in:
Nlick47
2025-04-18 20:02:40 +08:00
parent 6d5693f19d
commit d50818b347

View File

@@ -7,6 +7,14 @@
xmlns:behavior="clr-namespace:DownKyi.CustomAction"
xmlns:asyncImageLoader="clr-namespace:DownKyi.CustomControl.AsyncImageLoader"
x:DataType="vm:ViewVideoDetailViewModel">
<UserControl.Resources>
<ControlTheme TargetType="TextBlock" x:Key="DataGridCellTextBlockTheme">
<Setter Property="Margin" Value="{DynamicResource DataGridTextColumnCellTextBlockMargin}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource ColorTextDark}"></Setter>
</ControlTheme>
</UserControl.Resources>
<Grid RowDefinitions="50,10,*">
<Grid Grid.Row="0" ColumnDefinitions="40,*,50">
@@ -428,6 +436,18 @@
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
<DataGrid.RowTheme>
<ControlTheme TargetType="DataGridRow"
BasedOn="{StaticResource {x:Type DataGridRow}}">
<Style Selector="^ /template/ Rectangle#BackgroundRectangle">
<Setter Property="IsVisible" Value="False" />
<Setter Property="Fill" Value="{DynamicResource SystemAccentColor}" />
</Style>
</ControlTheme>
</DataGrid.RowTheme>
</DataGrid>
<Grid Grid.Row="3"