XML : style trigger setting colour to cells with specific value in data grid

I am trying to set colour to a cell of a data grid with the help of trigger, but the following code is not working

  <DataGrid.CellStyle>                  <Style TargetType="DataGridCell">                      <Style.Triggers>                      <Trigger Property="Content" Value="1">                              <Setter Property="Background" Value="LightGreen"/>                          </Trigger>                      </Style.Triggers>                  </Style>            </DataGrid.CellStyle>    

if the content of a datagrid cell is 1 i want that cell to be coloured yellow pleses help.

No comments:

Post a Comment