Add alternating colors to datagrid rows in ImageInfo panel.

This commit is contained in:
2025-12-15 14:25:09 +00:00
parent cb9f6a1365
commit a8b1f21dc0

View File

@@ -47,6 +47,34 @@
<Design.DataContext>
<panels:ImageInfoViewModel />
</Design.DataContext>
<UserControl.Styles>
<Style Selector="DataGridRow:nth-child(2n)">
<Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" />
</Setter>
</Style>
<Style Selector="DataGridRow:nth-child(2n) DataGridCell">
<Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" />
</Setter>
</Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):selected">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):selected DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style>
</UserControl.Styles>
<Grid RowDefinitions="Auto,*,Auto"
Margin="12"
RowSpacing="8">