<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=QueryName}"
Value="AI Airline Query 1">
<Setter>
<Setter.Property>Background</Setter.Property>
<Setter.Value>Yellow</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
转载于:https://www.cnblogs.com/movingcity/archive/2012/11/29/2794548.html