How to use AlternationIndex in ItemsControls?
The ItemContainerStyle is applied to the elements generated by the ItemsControl: ContentPresenter. The ContentPresenter will in turn contain whatever you put in your ItemTemplate. In the case of a ListBox, the ItemContainerStyle is applied to the generated ListBoxItem. The AlternationCount is, based on what you posted, only available on these generated items. You cannot use … Read more