This works with the standard ListBox:
This does not work with the RadListBox:
Any ideas?
<Window x:Class="WpfApplication1.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.Resources> <Style TargetType="{x:Type ListBoxItem}"> <Style.Triggers> <Trigger Property="ItemsControl.AlternationIndex" Value="0"> <Setter Property="Background" Value="LightYellow"></Setter> </Trigger> <Trigger Property="ItemsControl.AlternationIndex" Value="1"> <Setter Property="Background" Value="LightBlue"></Setter> </Trigger> </Style.Triggers> </Style> </Grid.Resources> <ListBox ItemsSource="{Binding Path=Items}" AlternationCount="2"/> </Grid></Window>This does not work with the RadListBox:
<Window x:Class="WpfApplication1.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.Resources> <Style TargetType="{x:Type t:RadListBoxItem}"> <Style.Triggers> <Trigger Property="ItemsControl.AlternationIndex" Value="0"> <Setter Property="Background" Value="LightYellow"></Setter> </Trigger> <Trigger Property="ItemsControl.AlternationIndex" Value="1"> <Setter Property="Background" Value="LightBlue"></Setter> </Trigger> </Style.Triggers> </Style> </Grid.Resources> <t:RadListBox ItemsSource="{Binding Path=Items}" AlternationCount="2"/> </Grid></Window>Any ideas?