In Windows phone8.1, the list display data is divided into the following controls, Itemscontrol,listbox,listview,gridview,semanticzoom controls.
I've been using a ListBox control or ListView control to display simple data, today I casually play, write a few simple display of data, with ItemsControl implementation, began to feel good, when I put the data amount of time, the situation of the pit dad happened, can't slide!!! That is, you can only display the mobile phone page that much higher data, can not swipe to see the back of the data, there is no ListBox control or the ListView control with a cool, and then looked on the Internet.
Originally, ItemsControl only implemented a list of the most basic functions, did not implement some more complex logic functions, such as the large amount of data, can produce sliding effect, list selection is selected effect. So, you can't swipe. It is because its functionality is so concise that it performs more quickly than several other list controls.
Down to see how to implement the sliding function of ItemsControl data.
<Grid> <itemscontrol x:name= "Item" > <!--here to set controls to implement sliding Features-<ItemsControl.Template> <controltemplate targettype= "ItemsControl" > <ScrollViewer> <ItemsPresenter/> </ScrollViewer> </ControlTemplate> </ItemsControl.Template> <!--setting up data templates-- <ItemsControl.ItemTemplate> <DataTemplate> <stackpanel orientation= "Hori Zontal "> <textblock text=" {Binding Name} "fontsize=" > </textb Lock> <textblock text= "{Binding Num}" fontsize= "/> </STACKPANEL&G" T </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </grid>
is not very good implementation, here is just the front desk simple code, if you view the demo file, please click to download http://pan.baidu.com/s/1sFcVc
Windows phone8.1 List Display