If we use the style selector approach we get a bit better performance than with the alternation count approach. However, there is still some lag when scrolling.
We use row index to decide if the row in question is an even or odd row. Thus, in the style selector we currently use this code to get the index of the row:
var index = grid.Items.IndexOf(item);
That seems to be the performance bottle neck. Is there any faster way to get the index or other way to know if the row index is even or odd? There is the IsAlternate property but setting the AlternationCount on is the reason for the original performance problems.