Windows Phone 8.1 Development: Lock Screen Reminders

Source: Internet
Author: User

Source: http://www.bcmeng.com/lockscreen/

Before the small dream and everyone to share the toast Notice, magnet update, today small dream and everyone share the Windows Phone 8.1 development in the lock screen reminder. The badge is simple compared to toast notifications and magnet updates. There are two types of badge: a digital reminder and a glyph alert, in Windows In Phone 8.1, the phone badge only supports the "alert" and "note" status glyphs and numbers. Sending any other glyphs to your phone clears the badge. The supported glyphs are as follows:

Status Glyph XML
No No badge is displayed <badge value="none"/>
Alerts <badge value="alert"/>
Attention <badge value="attention"/>
Select a reminder type:

Select number:

XmlDocument badgexml = badgeupdatemanager.gettemplatecontent (Badgetemplatetype.badgenumber);

Select a glyph:

XmlDocument badgexml = badgeupdatemanager.gettemplatecontent (badgetemplatetype.badgeglyph);
Set the value for a number or glyph:

Set the value of the number: ( Note: If the number is greater than 99, the 99+ is displayed)

XmlElement badgeelement = (XmlElement) badgexml.selectsinglenode ("/badge");            Badgeelement.setattribute ("value""n");

Set the value of the glyph:

Badgeelement.setattribute ("value""alert"); Badgeelement.setattribute ("value""attention") ;
Create a badge alert and send it to a badge:
   New badgenotification (badgexml);    Badgeupdatemanager.createbadgeupdaterforapplication (). Update (badge);

The effect is as follows:

So how to display the badge update on the lock screen:

Very simply, first in the app manifest file in the app 's lock screen notification select Badge and figure this article block .

Then upload a 24*24 png image in the badge of the visible asset , preferably transparent. The badge is then displayed on the lock screen. The effect is as follows:

Windows Phone 8.1 Development in the toast notification, magnet Update, lock screen Reminder small dreams are shared with you, and in the actual application of these updates are generally in the background tasks updated, and then combined with the background task explained before, I believe everyone will be!

Windows Phone 8.1 Development: Lock Screen Reminders

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.