Merge pull request #265 from NLick47/fac_05

refactor: 更改解析页DataGrid选中行高亮颜色
This commit is contained in:
yaobiao131
2025-04-21 20:05:14 +08:00
committed by GitHub
4 changed files with 37 additions and 0 deletions

View File

@@ -56,5 +56,7 @@
<SolidColorBrush x:Key="BrushMoney" Color="{DynamicResource ColorMoney}" />
<SolidColorBrush x:Key="BrushPublication" Color="{DynamicResource ColorPublication}" />
<SolidColorBrush x:Key="BrushDataGridHighlight" Color="{DynamicResource ColorDataGridHighlight}" />
</ResourceDictionary>

View File

@@ -19,5 +19,7 @@
<Color x:Key="ColorText">Black</Color>
<Color x:Key="ColorTextDark">white</Color>
<Color x:Key="ColorTabHeaderGrey">#FF141414</Color>
<Color x:Key="ColorDataGridHighlight">#096085</Color>
</ResourceDictionary>

View File

@@ -56,5 +56,7 @@
<Color x:Key="ColorMoney">#FFFFAE00</Color>
<Color x:Key="ColorPublication">#FF02B5DA</Color>
<Color x:Key="ColorDataGridHighlight">#80D0E8</Color>
</ResourceDictionary>

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,29 @@
</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 BrushDataGridHighlight}" />
</Style>
<Style Selector="^:pointerover /template/ Rectangle#BackgroundRectangle">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Opacity" Value="0.3" />
</Style>
<Style Selector="^:selected /template/ Rectangle#BackgroundRectangle">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Opacity" Value="1" />
</Style>
</ControlTheme>
</DataGrid.RowTheme>
</DataGrid>
<Grid Grid.Row="3"