-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Bug explanation
When AlternatingRowBackground is used MaterialDesign.Brush.DataGrid.RowHoverBackground does not take precedence over the alternating color.
To reproduce:
<DataGrid AlternatingRowBackground="Green"
CanUserAddRows="False"
CanUserDeleteRows="False"
IsReadOnly="True"
ItemsSource="{Binding Numbers}">
<DataGrid.Resources>
<SolidColorBrush x:Key="MaterialDesign.Brush.DataGrid.RowHoverBackground" Color="Red" />
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding .}" Header="Number" />
</DataGrid.Columns>
</DataGrid>public partial class MainWindow
{
public List<int> Numbers { get; }
public MainWindow()
{
Numbers = Enumerable.Range(0, 100).ToList();
DataContext = this;
InitializeComponent();
}
}When mouse is over alternating green row background color stays green.
Version
5.3.0