I have following listview on my Pivot Item:
<ListView
ItemsSource="{Binding Items}"
IsItemClickEnabled="True"
ContinuumNavigationTransitionInfo.ExitElementContainer="True">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,0,0,9.5">
<TextBlock
Text="{Binding Description}"
TextWrapping="Wrap"
Pivot.SlideInAnimationGroup="1"
CommonNavigationTransitionInfo.IsStaggerElement="True"
Style="{ThemeResource ListViewItemTextBlockStyle}"
Margin="0,0,19,0"/>
<TextBlock
Text="{Binding Measure}"
TextWrapping="WrapWholeWords"
Pivot.SlideInAnimationGroup="2"
CommonNavigationTransitionInfo.IsStaggerElement="True"
Style="{ThemeResource ListViewItemContentTextBlockStyle}"
Margin="0,0,19,0"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.GroupStyle>
<GroupStyle >
<GroupStyle.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Description}" FontWeight="Bold" HorizontalAlignment="Center" />
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ListView.GroupStyle>
But the list items are not getting grouped and it looks like:
Since I have list of size more than 1600 items so I want to group the list items alphabetically. So when I click on "A" box at the top of list view the phone takes me to view where all alphabets are shown in grid and when I click on particular alphabet phone takes me back to items in list having description starting with that alphabet. Just like contact list view.
Aucun commentaire:
Enregistrer un commentaire