Update background color for alternating DataGrid rows in multiple XAML files for improved visibility

This commit is contained in:
2025-12-16 09:19:14 +00:00
parent afcc6206d0
commit 2517335bf7
4 changed files with 4 additions and 56 deletions

View File

@@ -50,30 +50,17 @@
<UserControl.Styles> <UserControl.Styles>
<Style Selector="DataGridRow:nth-child(2n)"> <Style Selector="DataGridRow:nth-child(2n)">
<Setter Property="Background"> <Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" /> <SolidColorBrush Color="#15FFFFFF" />
</Setter>
</Style>
<Style Selector="DataGridRow:nth-child(2n) DataGridCell">
<Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" />
</Setter> </Setter>
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover"> <Style Selector="DataGridRow:nth-child(2n):pointerover">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" /> Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):selected"> <Style Selector="DataGridRow:nth-child(2n):selected">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" /> Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):selected DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style>
</UserControl.Styles> </UserControl.Styles>
<Grid RowDefinitions="Auto,*,Auto" <Grid RowDefinitions="Auto,*,Auto"
Margin="12" Margin="12"

View File

@@ -49,30 +49,17 @@
<UserControl.Styles> <UserControl.Styles>
<Style Selector="DataGridRow:nth-child(2n)"> <Style Selector="DataGridRow:nth-child(2n)">
<Setter Property="Background"> <Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" /> <SolidColorBrush Color="#15FFFFFF" />
</Setter>
</Style>
<Style Selector="DataGridRow:nth-child(2n) DataGridCell">
<Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" />
</Setter> </Setter>
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover"> <Style Selector="DataGridRow:nth-child(2n):pointerover">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" /> Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):selected"> <Style Selector="DataGridRow:nth-child(2n):selected">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" /> Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):selected DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style>
</UserControl.Styles> </UserControl.Styles>
<TabControl> <TabControl>
<TabItem IsVisible="False"> <TabItem IsVisible="False">

View File

@@ -49,30 +49,17 @@
<UserControl.Styles> <UserControl.Styles>
<Style Selector="DataGridRow:nth-child(2n)"> <Style Selector="DataGridRow:nth-child(2n)">
<Setter Property="Background"> <Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" /> <SolidColorBrush Color="#15FFFFFF" />
</Setter>
</Style>
<Style Selector="DataGridRow:nth-child(2n) DataGridCell">
<Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" />
</Setter> </Setter>
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover"> <Style Selector="DataGridRow:nth-child(2n):pointerover">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" /> Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):selected"> <Style Selector="DataGridRow:nth-child(2n):selected">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" /> Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):selected DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style>
</UserControl.Styles> </UserControl.Styles>
<Grid RowDefinitions="*, Auto" <Grid RowDefinitions="*, Auto"
RowSpacing="8" RowSpacing="8"

View File

@@ -49,30 +49,17 @@
<UserControl.Styles> <UserControl.Styles>
<Style Selector="DataGridRow:nth-child(2n)"> <Style Selector="DataGridRow:nth-child(2n)">
<Setter Property="Background"> <Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" /> <SolidColorBrush Color="#15FFFFFF" />
</Setter>
</Style>
<Style Selector="DataGridRow:nth-child(2n) DataGridCell">
<Setter Property="Background">
<SolidColorBrush Color="#0CFFFFFF" />
</Setter> </Setter>
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover"> <Style Selector="DataGridRow:nth-child(2n):pointerover">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" /> Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):selected"> <Style Selector="DataGridRow:nth-child(2n):selected">
<Setter Property="Background" <Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" /> Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style> </Style>
<Style Selector="DataGridRow:nth-child(2n):selected DataGridCell">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style>
</UserControl.Styles> </UserControl.Styles>
<TabControl> <TabControl>
<TabItem IsVisible="{Binding !!InquiryData, Mode=OneWay}"> <TabItem IsVisible="{Binding !!InquiryData, Mode=OneWay}">