Introduction to the use of ListBox in Windows Phone 7 (2)

Source: Internet
Author: User

In the previous article "talking about the use of ListBox in Windows Phone 7", we introduced the usage of ListBox in Windows Phone 7. We will continue to explore ListBox today. The topic is the performance of ListBox.

I believe that if you deploy your Windows Phone to a phone 7 real machine, you may encounter performance problems. Of course, this is also one of the differences between the simulator and the real device, these problems are largely caused by the rendering of ListBox and the download of images from the web. Here is an article about ListBox performance provided by the Microsoft WP7 team.ArticleIt is worth noting that the Microsoft WP7 team is working on how to optimize Windows Phone.ProgramSuggestions. It is a performance test performed by Colin Eberhardt on nodo. It can be found that itemscontrol can provide similar ListBox functions in a shorter period of time.

 

One problem we may encounter when testing on a real machine is that when I jump from one page to another, on this page, there is a complicated UI (for example, The ListBox contains 100 pieces of data, and the template of The ListBox application is relatively complex ). At this time, our program feels like it is dead and the interface is motionless. Xiao Qi said innocently that I am not dead yet. I am loading the data and rendering interface. When I get it done, I will live. Please wait for me for one minute. Can a user wait for one minute? This will bring a poor user experience. Studies abroad have suggested that panorama controls consume about 1.6 seconds to load!

When an application is started, a startup screen will tell the user that the program is being started. When switching the page, we can add a similar effect to tell the user, please wait, I am loading. The foreign Daniel Colin Eberhardt has provided a good idea, called deferredloadcontentcontrol. Below are two types of user comparison diagrams for loading.

 

 

SpecificCodeSee deferredloadcontentcontrol.zip.

If the items in your ListBox are complex, we recommend that you use lazylistbox, a template that uses a simple template during sliding and changes to a normal (complex UI) template when the slide is stopped, specific can refer to the http://blogs.msdn.com/ B /ptorr/archive/2010/10/12/procrastination-ftw-lazylistbox-should-improve-your-scrolling-performance-and-responsiveness.aspx

In mango, the Windows Phone team has optimized ListBox. If your ListBox contains images, it will enable background thread processing. If you have upgraded to mango, then you can see what changes have been made to ListBox, or you can replace lazylistbox with ListBox .....

PS: This article has been stored in the draft box for more than January years. Today I took some time to sort it out and release it...

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.