WPF ItemsControl the current ListItem Index in the ItemsSource
Is it possible to know the current item's Index in a ItemsControl? EDIT This works! <Window.Resources> <x:Array Type="{x:Type sys:String}" x:Key="MyArray"> <sys:String>One</sys:String> <sys:String>Two</sys:String> <sys:String>Three</sys:String> </x:Array> </Window.Resources> <ItemsControl ItemsSource="{StaticResource MyArray}" AlternationCount="100"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Margin="10"> <!-- one --> <TextBlock Text="{Binding Path=., StringFormat={}Value is {0}}" /> <!-- two --> <TextBlock Text="{Binding Path=(ItemsControl.AlternationIndex), RelativeSource=