Reputation: 16361
I have a Windows Phone 8 supporting Live Tiles (the default medium and small). I update the Live Tile using a fairly standard code
var tile = ShellTile.ActiveTiles.First();
if (tile == null) return;
var data = new StandardTileData {Title = "some title"};
data.BackgroundImage = new Uri("/Background.png", UriKind.Relative);
data.Count = count;
tile.Update(data);
I want to add support for the Large tile but I want to to be different. I do not want to use the count and I want to render some custom text to the images:
var data = new StandardTileData {Title = "some title"};
data.BackgroundImage = new Uri("path to a custom rendered image", UriKind.Relative);
data.Count = 0;
My question is, how do I determine if my Live tile is Medium (small) or Large make the appropriate update? Or how do I set the tile update to be entirely different for Medium (small) and Large tile?
Upvotes: 2
Views: 1559
Reputation: 65586
StandardTileData
is the WP7 specific format for tile data. It's WP8 equivalent is
FlipTileData
which includes separate properties for the different tile sizes:
FlipTileData TileData = new FlipTileData()
{
Title = "[title]",
BackTitle = "[back of Tile title]",
BackContent = "[back of medium Tile size content]",
WideBackContent = "[back of wide Tile size content]",
Count = [count],
SmallBackgroundImage = [small Tile size URI],
BackgroundImage = [front of medium Tile size URI],
BackBackgroundImage = [back of medium Tile size URI],
WideBackgroundImage = [front of wide Tile size URI],
WideBackBackgroundImage = [back of wide Tile size URI],
};
See also the WP8 specific docs for tiles. http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202948(v=vs.105).aspx
Upvotes: 3