This article describes the list selection control in the new features of Windows Phone 8.1. In the era of Windows Phone 8, you will use Longlistselector to implement the list selection control and group the data. For example, in the Address book, according to the first letter of the group, click on the group title to jump to the corresponding group of the title. While Windows Phone 8.1 uses the ListView and SemanticZoom to implement, let's look at the implementation process. First, let's get to know the ListView and Semanticzoom:listview are literally not difficult to understand, a list view control, and its actual function is similar to the literal expression, it is a collection of items in a list scrolling display control. SemanticZoom may seem a little strange, semantic scaling. It is a container control that allows users to scale between two views of a collection item. Simply put, when we group a contact collection by the first letter, we can zoom in on the contact list and the alphabetical list by using the Semantic zoom control to navigate to the letter grouping by selecting the letters. Possible source fragments: http://code.662p.com/list/14_1.html Let's look at the code implementation, first of all XAML:
<semanticzoom x:name= "SemanticZoom" iszoomoutbuttonenabled= "true" canchangeviews= "true" > < semanticzoom.zoomedinview> <listview x:name= "Listviewdetail" isswipeenabled= "true" IsTapEnabled= "true" IsItem Clickenabled= "true" iszoomedinview= "true" > <ListView.ItemTemplate> <DataTemplate> <grid height= "> <Grid.ColumnDefinitions> <columndefinition width= "/> <columndefinition width=" * "/> </Grid.ColumnDefinitions> <border background= "aliceblue" grid.column= "0"/> <textblock grid.column= "1" text= "{Binding ContactName}" fontsize= "/> </grid" > </DataTemplate> </ListView.ItemTemplate> <ListView.GroupStyle> <GroupStyle> <GroupStyle.HeaderTemplate> <DataTemplate> <bor Der Background= "Blue" height= "width=" "horizontalalignment=" left "margin=" 0,20,0,20 "tapped=" border_tapped " > <textblock text= "{Binding Title}" fontsize= "/> <" ;/border> </DataTemplate> </GroupStyle.HeaderTemplate> <GroupStyle.Panel> <ItemsPanelTemplate> <variabl Esizedwrapgrid orientation= "Vertical" margin= "0 0 0" itemheight= "" "/> </itemspaneltemplat e> </GroupStyle.Panel> </GroupStyle> </listview.groupstyle& Gt <ListView.ItemsPanel> <ItemsPanelTemplate> <stackpanel orientation= "Verti Cal "/> </ItemsPanelTemplate> </ListView.ItemsPanel> </ListView> </semanticzoom. zoomedinview> <SemanticZoom.ZoomedOutView> <listview x:name= "listviewsummary" background= "Black" IsZ oomedinview= "False" > <ListView.ItemTemplate> <DataTemplate> &L T Border height= "width=" background= "Blue" margin= "10,10,10,10" > <textblock text= "{Bind ing group.title} "fontsize="/> </Border> </DataTemplate> &L T;/listview.itemtemplate> <ListView.ItemsPanel> <ItemsPanelTemplate> <stackpanel orientation= "Vertical"/> </ItemsPanelTemplate> </listview.item Spanel> </ListView> </SemanticZoom.ZoomedOutView></SemanticZoom>
Detailed Description: http://wp.662p.com/thread-8197-1-1.html
Windows Phone 8.1 New Features-control's list selection control