This is my first question so be careful :) i'm trying to do a binding of the property (a) in the xaml, the foreground color works(so the ref of the datagrid cell is right), but the background not and i'm trying to understand why, if i try to debug my property the program doesnt enter in it....
(a)=
public int CellGiorno1
{
get
{
int a = myfunctionexample(day, Username, month, year);
return a;
//return 0-1-2
}
}
(the column of the datagrid where i want to color the background if the number returned is 1) DataGridTextColumn Header="2" x:Name="HeaderGG1" Binding={Binding Desc_GG1}" CellStyle="{StaticResource CellStyleGiorno}"/>
(the style with the trigger that color the foreground but not the background)
<Style x:Key="CellStyleGiorno" TargetType="DataGridCell">
<Setter Property="Foreground" Value="Red"/>
<Style.Triggers>
<DataTrigger Binding="{Binding CellGiorno1}" Value="1">
<Setter Property="Background" Value="Green"/>
</DataTrigger>
</Style.Triggers>
</Style>