I've this DataGrid structure:
But I doesn't found any property that bind the generic value each DataGridTextColumn.
How can I achieve this?
Thanks.
Code:
<DataGrid ItemsSource="{Binding MatchService.Matches}" AutoGenerateColumns="False"
CanUserAddRows="false" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Header="{DynamicResource championship}" Binding="{Binding Competition}"/>
<DataGridTextColumn Header="1" Binding="{Binding HomeWin}"/>
<DataGridTextColumn Header="X" Binding="{Binding Draw}"/>
</DataGrid.Columns>
Essentially I need to change the background of all the cell that have 1 and X header, if the value of the row is: < 50 the cell should have a background of red, if is >60 green.
What I did until now is:
<DataGrid.Resources>
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<Trigger Property="" Value="50">
</Trigger>
</Style.Triggers>
</Style>
How can I achieve this?
Thanks.