Programmatically Updating Shell Tiles

Both primary and secondary tiles can be updated by your app, either while your app is running in the foreground or from a background agent. Observe the following example:

ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault();if (tile != null){    IconicTileData tileData = new IconicTileData        {            BackgroundColor = Colors.Cyan        };    tile.Update(tileData);}

Here the app uses the iconic tile template. The tile is retrieved from the static ActiveTiles collection of the ShellTile class. Regardless of whether the app is pinned to the Start Experience, ActiveTiles always contains at least one tile: the app’s primary tile. A tile is updated by creating an instance ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.