How to check if a row has odd number?

后端 未结 3 2028
无人共我
无人共我 2021-01-15 02:03

I\'m trying to set different color for odd rows using XAML.

The datagrid in question has 3 different types of data, which I want to color differently, and simply cha

3条回答
  •  萌比男神i
    2021-01-15 02:48

    I am not sure which grid/row type you are using, so I can't give you the exact property names, however, bind to the row's index (row number) and use a value converter (that returns true) to check if the row is odd or even.

提交回复
热议问题