Starting off with the example here, I created an app to pin multiple tiles to the Start screen. When I pin the first tile, I have no issues. However, when I return to the app (via the app list or the back key), and click on a second image to pin the second tile, I get an InvalidOperationException.
Here is my simple code:
private void Pin_Tile1(object sender, RoutedEventArgs e)
{
StandardTileData data1 = new StandardTileData
{
BackgroundImage = new Uri("Assets/tile1.png", UriKind.Relative),
Title = "Tile 1",
BackContent = "asdf"
};
ShellTile.Create(new Uri("/MainPage.xaml", UriKind.Relative), data1);
}
private void Pin_Tile2(object sender, RoutedEventArgs e)
{
StandardTileData data20 = new StandardTileData
{
BackgroundImage = new Uri("Assets/tile2.png", UriKind.Relative),
Title = "Tile 2",
BackContent = "fdsa"
};
ShellTile.Create(new Uri("/MainPage.xaml", UriKind.Relative), data2);
}
Can anyone tell me what is going on? Thanks for looking
From here, each live tile must point to a unique Uri, that is where I messed up.
Full list of requirements is: