1. An application can provide the following four items on the lock screen:
A. background image.
B. A 24x24 pixel PNG application icon
C. One Application count
D. A string of text strings
2. Open wpappmanifest. XAML with XML (text) editor; Add the following code after </token>:
<Extensions>
<Extension extensionname = "lockscreen_wallpaper" consumerid = "{111dff24-aa15-4a96-8006-2bff8122084f}" taskid = "_ default"/>
<Extension extensionname = "lockscreen_notification_iconcount" consumerid = "{111dff24-aa15-4a96-8006-2bff8122084f}" taskid = "_ default"/>
<Extension extensionname = "lockscreen_notification_textfield" consumerid = "{111dff24-aa15-4a96-8006-2bff8122084f}" taskid = "_ default"/>
</Extensions>
3. Use the lockscreenwallpapermanager class to add code to change the lock screen background.
Private async void buttonset_click (Object sender, routedeventargs E)
{
Uri nextimageuri;
Nextimageuri = new uri ("file: //" + windows. ApplicationModel. Package. Current. installedlocation. Path + "/defaultwallpaper.jpg", urikind. relativeorabsolute );
Try
{
Bool isprovider = windows. Phone. system. USERPROFILE. lockscreenwallpapermanager. isprovidedbycurrentapplication;
If (isprovider)
{
Windows. Phone. system. USERPROFILE. lockscreenwallpaper. setimageuri (nextimageuri );
}
Else
{
VaR op = await lockscreenwallpapermanager. requestaccessasync ();
}
}
Catch (system. Exception ex)
{
MessageBox. Show (ex. tostring ());
}
}