conditional formatting in wpf toolkit datagrid
问题 hey i wanna change row foreground color according to a boolean in the model, whats the best way of doing it? 回答1: Define the style as following (IsBlah is a boolian property): <Style x:Key="MyRowStyle" TargetType="{x:Type dg:DataGridRow}"> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="DarkBlue"/> <Style.Triggers> <DataTrigger Binding="{Binding IsBlah}" Value="False" > <Setter Property="Background" Value="DarkGray" /> <Setter Property="Foreground" Value=