I'm having issues with AlternatingRowStyle not being applied as
expected when adding or removing items to the underlying
ObservableCollection to which the grid is bound via the ItemsSource
property.
The grid is sorted such that the newly added items are always at the top and the AlternationCount is set to 2.
When adding a second item, the rows display as expected, but when a third item is added, all rows display with the default style. Removing an item from the list does not cause the other rows to adjust based on their new position.
If I Commit an Edit to a cell in the grid, all rows in the grid will update their style and display as expected.
What could cause this kind of behaviour and how do I fix it?
The grid is sorted such that the newly added items are always at the top and the AlternationCount is set to 2.
When adding a second item, the rows display as expected, but when a third item is added, all rows display with the default style. Removing an item from the list does not cause the other rows to adjust based on their new position.
If I Commit an Edit to a cell in the grid, all rows in the grid will update their style and display as expected.
What could cause this kind of behaviour and how do I fix it?