Skip to content

Instantly share code, notes, and snippets.

@GSonofNun
Created August 23, 2014 20:00
Show Gist options
  • Save GSonofNun/2e0125bdc82fdc5fb91d to your computer and use it in GitHub Desktop.
Save GSonofNun/2e0125bdc82fdc5fb91d to your computer and use it in GitHub Desktop.
Method to update primary tile.
private static void UpdateTile()
{
var updater = TileUpdateManager.CreateTileUpdaterForApplication();
if (updater == null)
{
return;
}
updater.EnableNotificationQueue(true);
updater.Clear();
ITileWide310x150ImageAndText02 mainWideContent = TileContentFactory.CreateTileWide310x150ImageAndText02();
mainWideContent.Image.Src = "ms-appdata:///local/tile_wide.jpg";
ITileSquare150x150PeekImageAndText04 mainSquareContent = TileContentFactory.CreateTileSquare150x150PeekImageAndText04();
mainSquareContent.Image.Src = "ms-appdata:///local/tile_medium.jpg";
mainWideContent.Square150x150Content = mainSquareContent;
updater.Update(mainWideContent.CreateNotification());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment