Learn Windows Phone7 development together (122.shelltileschedule)

Source: Internet
Author: User

For the PUSH message service, it is generally done through the WebService Service, but sometimes it is only used to update the Tile image, which is a little too small, it can be said that it is too troublesome to display. Obviously there should be no such problem. It is very convenient to use ShellTileSchedule. Just a few lines of code can be easily done.

ShellTileSchedule sechedule = new ShellTileSchedule ();

Sechedule. Recurrence = UpdateRecurrence. Onetime; // update only once

Sechedule. RemoteImageUri = new Uri (@ "http: \ www.contoso.com \ myimage.png ");

Sechedule. StartTime = DateTime. Now;

Sechedule. StartTime. AddHours (1 );

Sechedule. Start ();

Or:

Sechedule. Interval = UpdateInterval. EveryDay; // the number of updates per day

Sechedule. Recurrence = UpdateRecurrence. Interval;

Sechedule. MaxUpdateCount = 8;

Sechedule. RemoteImageUri = new Uri (@ "http: \ www.contoso.com \ myimage.png ");

Sechedule. Start ();

However, currently only one time can see the effect, and Interval does not know how to implement 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.