Change WPF Datagrid Row Color

后端 未结 2 475
夕颜
夕颜 2021-01-18 01:29

I have a WPF datagrid that is filled with an ObserverableCollection.

Now I want to color the rows depending on the row content at the program start and if something

2条回答
  •  庸人自扰
    2021-01-18 02:07

    Use the RowStyle. You can use the Triggers to change the color conditionally, or just bind it to a Brush property on your items and change that property respectively.

提交回复
热议问题