<ListBox AlternationCount="2" Width="140" Margin="18,63,480,24" Name="lstbxCuisines" ItemsSource="{Binding}" > <ListBox.ItemTemplate> <DataTemplate> <CheckBox Name="chkCuisine" Height="20" Margin="0,5,0,0" FontSize="12" Tag="{Binding CuisineId}" Content="{Binding Cuisine}"/> </DataTemplate> </ListBox.ItemTemplate> <ListBox.Resources> <Style TargetType="{x:Type ListBoxItem}"> <Style.Triggers> <Trigger Property="ItemsControl.AlternationIndex" Value="0"> <Setter Property="Background" Value="#ffffff"></Setter> </Trigger> <Trigger Property="ItemsControl.AlternationIndex" Value="1"> <Setter Property="Background" Value="#f1f6fe"></Setter> </Trigger> </Style.Triggers> </Style> </ListBox.Resources> </ListBox>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)