I am creating a DataGrid with rows with the AlternatingRowBackground property. However, the data in the rows must be changed, and this takes some time.
I am trying to make the background color of the lines light gray when they are initialized. Here is what I do in the RowTemplate:
<ControlTemplate.Triggers> <DataTrigger Binding="{Binding Initialized}" Value="False"> <Setter Property="Background" Value="LightGray"/> </DataTrigger> </ControlTemplate.Triggers>
But this does not work for odd lines that still have the color specified in AlternatingRowBackground.
How to overwrite this so that all lines that were not initialized look light gray?
c # wpf xaml datagrid
Arsen zahray
source share