How to add different background colors to alternate rows to list box items windows phone 8
问题 I'm new to windows phone development. I'm showing data in list box. For for all rows in the list box the back ground color is same. But I want to add two different colors for alternate rows to list box items. Below is the code for list view. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,10,0,0" Background="White"> <ListBox Margin="6,6,-6,6" Name="itemslb" SelectionChanged="itemList_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <Grid x:Name="listItem"> <Grid.RowDefinitions>