Application tile and badge example this example shows how to use an application tile, which is the representation and starting point for your application Program On the boot screen, and a badge, tile, this is a way to pass the state information of this application that the user application will not run. The application tile is not only limited to static icons, but can live and content, so that users can clearly understand the news and events or display content (such as photos) related to the application. Notifications are updated. Based on the windows-supplied group template, the new content of the tile can display local and network text and images on the tile at the same time. The example demonstrates the following scenarios: new text content transmission • tiles use a notification using a local image • tile notifications • send a notification update using Web image notifications on the tile • badges provide content and send on the tile • Each Tile template • Enable notification queue, it allows five tiles of the most recent notification cycle to use tags to selectively Replace the notification in the queue • set an expiration time for the notification content, remove the tile by using different access images • Protocols and by using a predefined root path • Globalization, including localization, scaling images and accessibility Private Void Updatetilewithtext_click ( Object Sender, routedeventargs e ){
// Note: This sample contains an additional project, notificationsextensions.
// Icationicationsextensions exposes an object model for creating configurations, but you can also modify the XML
// Of the notification directly using tileupdatemanager. gettemplatecontent (tiletemplatetype)
// Create the wide Template
Itilewidetext03 tilecontent = tilecontentfactory. createtilewidetext03 ();
Tilecontent. textheadingwrap. Text = " Hello world! My very own tile notification " ;
// Users can resize tiles to square or wide.
// Apps can choose to include only square assets (meaning the app's tile can never be wide), or
// Include both wide and square assets (the user can resize the tile to square or wide ).
// Apps cannot include only wide assets.
//Apps that support being wide shoshould include square tile configurications since users
//Determine the size of the tile.
// Create the square template and attach it to the w ide template
itilesquaretext04 squarecontent = tilecontentfactory. createtilesquaretext04 ();
squarecontent. textbodywrap. TEXT = " Hello world! My very own tile notification ";
tilecontent. squarecontent = squarecontent;
//Send the notification
Tileupdatemanager. createtileupdaterforapplication (). Update (tilecontent. createnotification ());
Output. Text = tilecontent. getcontent ();
}
Private VoidCleartile_click (ObjectSender, routedeventargs E)
{
Tileupdatemanager. createtileupdaterforapplication (). Clear ();
Output. Text ="Tile cleared";
}
Complete example:/files/risk/windows8/Application tile sample.rar