0
Hi,
is their any way to display AlternationIndex ?
Below is my code this displaying 0 only ...
<ListBox x:Name="listBox" AlternationCount="3">
<ListBox.ItemTemplate >
<DataTemplate >
<Canvas Margin="0,20,0,0">
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Top" Text="{Binding Name }" FontSize="16" FontWeight="Bold" Margin="30,20,0,0" Foreground="Black" />
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
Path=(ItemsControl.AlternationIndex)}" />
</StackPanel>
</Canvas>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>