this might be really simple and I've tried searching but I haven't been able to find a solution.
My problem is quite basic. I am having trouble setting the BackBackgroundImage uri path to a local static png that I've made.
Here is the code I am using to generate the tile:
ShellTile testtile = ShellTile.ActiveTiles.First();
if (testtile != null)
{
StandardTileData newtiledata = new StandardTileData
{
Title = "Test Title",
Count = 0,
BackContent = "Test Content",
BackBackgroundImage = new Uri("Content/BackTileIcon.png", UriKind.Relative)
};
testtile.Update(newtiledata);
}
The problem is that I can't get BackTileIcon.png to display. I get the "Test Content" displaying fine and the tile flips back to the front image OK, it's just the back image that I can't display.
If I open the XAP after building I can see that there is a Content folder and inside the content folder is the BackTileIcon.png file.
I can't work out the format I need for the Uri for a local image in a subfolder. I changed the Uri to point to my games large icon which is included in the root folder (so the Uri path is just "LargeAppIcon.png") and that works so I know the code updates the back image OK with a correct path.
Am I just doing something stupidly wrong here?
Thanks for any help :)
In order to use a local image in your live tile, the image has to be in the IsolatedStorage under the folder /Shared/ShellContentand and not in your project.
You either have to generate the image in the application and save it directly in the isolatedStorage, or copy your content image in there at runtime.