I have a datagrid which I am trying to make similar: 
I use the AlternatingRowBackground
attribute to execute alternating colors. For a fixed color section, I have XAML that resembles:
<DataGrid.Resources> <Style TargetType="{x:Type DataGridRow}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=ShouldBeFixedColor}" Value="True"> <DataTrigger.Setters> <Setter Property="Background" Value="Blue" /> </DataTrigger.Setters> </DataTrigger> </Style.Triggers> </Style> </DataGrid.Resources>
The problem with this approach is that the "alternating color" takes precedence over a fixed color trigger. So below, instead of blue-blue, blue-gray-blue.
Any ideas on how to archive the desired color? I would prefer to do all this at the XAML level, if possible.
Thanks!
source share