Add alternating row colors and hover effects to DataGrid in DeviceList.axaml for improved visibility

This commit is contained in:
2025-12-16 09:19:37 +00:00
parent 2517335bf7
commit 5d98cc118a

View File

@@ -38,6 +38,19 @@
SelectedItem="{Binding SelectedDevice, Mode=TwoWay}"
ColumnHeaderHeight="32">
<DataGrid.Styles>
<Style Selector="DataGridRow:nth-child(2n)">
<Setter Property="Background">
<SolidColorBrush Color="#15FFFFFF" />
</Setter>
</Style>
<Style Selector="DataGridRow:nth-child(2n):pointerover">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
</Style>
<Style Selector="DataGridRow:nth-child(2n):selected">
<Setter Property="Background"
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
</Style>
<Style Selector="DataGridCell">
<Setter Property="Margin"
Value="4,0" />