×
Namespaces

Variants
Actions

Resetting the Live Tile in Windows Phone

From Nokia Developer Wiki
Jump to: navigation, search

This article explains how to Reset the Live Tile information to the default in Windows Phone 7, 8

WP Metro Icon UI.png
WP Metro Icon WP8.png
SignpostIcon WP7 70px.png
Article Metadata
Compatibility
Platform(s): Windows Phone 7
Windows Phone 8
Windows Phone 7.5
Article
Created: mohib.sheth (06 Mar 2012)
Last edited: hamishwillee (02 Jul 2013)

Introduction

The ability to update the Live Tile in Mango is a really great feature. I have an application where I’m generating dynamic images and setting the live tile to an isostore:/Shared/ShellContent url. But, I have a setting that the user can use to turn on/off live tile updates. When turning it off, I initially couldn’t figure out how to reset the tile.

The trick is to use an appdata: url to refer to your original image. For example, if your standard tile image is called “background.png”, then you can use the following to reset it:

public static void ResetTile()
{
StandardTileData newTileData = new StandardTileData();
newTileData.BackgroundImage = new Uri("appdata:background.png");
ShellTile appTile = ShellTile.ActiveTiles.First();
appTile.Update(newTileData);
}

Note: If you have changed any other properties like the BackContent, you will want to reset them by setting them to “”. Passing in null will leave the values unchanged.


Summary

This is a simple method of updating your Application's Live Tile from a IsolatedStorage rather than from a web service.

This page was last modified on 2 July 2013, at 14:08.
149 page views in the last 30 days.
×