Windows phone8.1 List Display

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.