So, simply enough I created a method called SetTile, this will create the active tile for you, so when your game is pinned it will display the tile and the information you want on it. I used the same sample I did last time to implement this so it’s all rolled in with the ringtone source.
public void SetTile(string title, string data, string tileAsset)
{
ShellTile tile = ShellTile.ActiveTiles.First();
if (tile != null)
{
StandardTileData tileUpdate = new StandardTileData
{
BackTitle = title,
BackContent = data,
BackBackgroundImage = new Uri(tileAsset, UriKind.Relative)
};
tile.Update(tileUpdate);
}
}
{
ShellTile tile = ShellTile.ActiveTiles.First();
if (tile != null)
{
StandardTileData tileUpdate = new StandardTileData
{
BackTitle = title,
BackContent = data,
BackBackgroundImage = new Uri(tileAsset, UriKind.Relative)
};
tile.Update(tileUpdate);
}
}
SetTile("Ringtones", "Play them or save them", "Tile.jpg");
Naturally you would have much better icons and messages on your tiles, but you could use this to show the players last high score, or there current progress in a currently saved game etc..
Source can be found here [Not Yet Uploaded]
No comments:
Post a Comment