Q:

Set color to a row in a Data Grid when a value property is X?

I'm using a Data Grid, when I set a list, display my data. But I'd like to asign a color to the data row when my value property is 0 and set another color when that one is 1.

A:

<DataGrid.RowStyle>
    <Style TargetType="DataGridRow">        
        <Style.Triggers>
            <DataTrigger Binding="{Binding YourProperty}" Value="1">
                <Setter Property="Background" Value="Red"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>                            
</DataGrid.RowStyle>

