To change color only in particular column, use MultiDataTrigger to check Column.Header value (eg below uses Age Column) : <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=Age}" Value="12"/> <Condition Binding="{Binding Column.Header, RelativeSource={RelativeSource Self}}" Value="Age"/> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="DataGridCell.Foreground" Value="Yellow" /> </MultiDataTrigger.Setters> </MultiDataTrigger> 这篇关于更改数据网格单元的前景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-25 21:54