Address: http://www.codeproject.com/Articles/247969/3-Ways-to-Update-the-Application-Tile-Content-in-M
How can I update the information of active tiles for applications in the mango system?
Have you ever thought about how to update the application tile information in the mango system? Before conducting in-depth research, let's take a look at the attributes of the tile.
Microsoft defines each of them as follows:
The attributes of the application tile and secondary tile are the same. Attributes on the front of the tile are:
·Title. A string that indicates the application title.TitleIt must be applicable to a single line of text and should not be wider than the actual tile width. The title can contain about 15 characters, and the remaining parts will be truncated.
·Backgroundimage. The image displayed on the front of the tile. We recommend that you always have a background image on the front of the tile.
·Count (also known as badges). The integer from 1 to 99. If the "count" value is not set or the value is set to 0, the circular image and value are not displayed on the tile.
Displays similar content on the back of the tile.
The attribute on the back of the tile is:
·Backtitle. The string displayed at the bottom of the tile.BacktitleIt must be applicable to a single line of text and should not be wider than the actual tile width. The title can contain about 15 characters, and the remaining parts will be truncated.
·Backbackgroundimage. The image displayed on the back of the tile.
·Backcontent. The string that is displayed in the center of the back of the tile. The tile can contain about 40 characters, and the excess part will be truncated.
(* From msdn)
Update the application porcelain stickers in three ways.
1. In the first method, only two options are updated-> title and background image right-click solution to open properties. You can see the set title and background image.
1. The second method allows youWmappmanifest. xmlModify all attributes if you create a new WP7 mango program.
Open its properties->Wmappmanifest. xml
If you run the application and pin it to the "Start" screen, you will see the following:
Let's change "count" and application "title"
Re-deploy the application, which is updated as follows:
However, this is not all we can do. If we enter "<" after the </title> label, the following options are displayed:
Set its attributes
Generate and deploy the program. After a few seconds, the tile will flip the back tile we just set
Note: comment out the section just added before we leave.
3. The third method is to change the application's tile content through code.
Shelltile firsttile = shelltile. activetiles. First ();
VaR newdata = new standardtiledata ()
{
Title = "michaelcrump. Net ",
Backgroundimage = new uri ("background.png", urikind. Relative ),
Count = 6,
Backcontent = "New backcontent ",
Backtitle = "New backtitle ",
Backbackgroundimage = new uri ("background.png", urikind. Relative ),
};
// Update the default Tile
Firsttile. Upate (newdata );
Run the application and run the code by clicking an event or something. We can see that the application porcelain stickers have been updated:
When the tile is flipped, it looks like this: