Windows phone uses the async CTP to implement asynchronous loading of data

Source: Internet
Author: User
Tags implement

Async CTP is a good thing, is installed when the comparison pit ...

With n more than a patch conflict, as long as the installation sequence to be able to successfully install ...

You can refer to the previous writing: http://www.cnblogs.com/sun8134/archive/2011/09/19/2181030.html

Asynchronous is a good thing, can let the background data operation when the foreground also has the reaction, not the card dead

Install the async CTP, as long as in the WP Project reference asyncctplibrary_phone.dll can be used async and await to implement asynchronous loading

MS has encapsulated some asynchronous operations, such as the WebClient can be used directly:

Uri UI = new Uri (URL);

System.Net.WebClient WC1 = new System.Net.WebClient ();

String TXs = await wc1. Downloadstringtaskasync (UI);

Here's how you can use async and await to implement asynchronous load data

In the example, our goal is to load an XML and bind the data to the listbox

First, I randomly found a student's grade XML.

Then make a data class Students.cs

Then edit the binding template for the next listbox:

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.