Reputation: 127
I need help binding this WPF to multiple datatriggers. I need to change row color based on two values not just the one. I wasn't able to figure out how to do that
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<DataTrigger Binding="{Binding AgentState}" Value="AUX-IN">
<Setter Property="Background" Value="Green" />
<Setter Property="Foreground" Value="White"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
Upvotes: 0
Views: 44
Reputation: 127
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding AgentState}" Value="ACD-IN"/>
<Condition Binding="{Binding AuxReasons}" Value="General"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" Value="Green" />
<Setter Property="Foreground" Value="White"/>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
Upvotes: 1