Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 11:08, 2 July 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Resetting the Live Tile in Windows Phone

From 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 11:08.
158 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×