WPF DataGrid - Alternating background colour based on property

Viewed 32

Let's say I have a datagrid that looks like so:

  ______________________________
 | Father     Child       Food  |
 |______________________________|
1| Barry      Nigel       Crisps|
 |______________________________|
2| Barry      Sean        Nuts  |
 |______________________________|
3| Simon      Betty       Nuts  |
 |______________________________|
4| Albert     Laura       Fruit |
 |______________________________|
5| Albert     Fred        Crisps|
 |______________________________|

Is it possible to create a style that alternates the background colour every time the Father property changes? I know an AlternationIndex can be used to alternate between rows, but that's not suitable in this instance?

0 Answers
Related