Windows Phone 7 development tips
Tag Archives: tile
2011/06/18Posted by on
Updating the Application Tile is something very appreciated on Windows Phone 7, by users but also by Microsoft. Doing this using notifications can be quite a hassle as you need to write a server side application sending notifications to the phone, but if you need a simple tile update, Microsoft also added the ShellTileSchedule class which provides an easy way to handle this.
Exemple usage, this call is usually made in App.xaml.cs, in App() constructor :
ShellTileSchedule shellTileSchedule = new ShellTileSchedule();
shellTileSchedule.Recurrence = UpdateRecurrence.Interval;
shellTileSchedule.Interval = UpdateInterval.EveryHour;
shellTileSchedule.MaxUpdateCount = 168;
shellTileSchedule.StartTime = DateTime.Now;
shellTileSchedule.RemoteImageUri = new Uri(@”http://website.com/wp7icon.png”);
Recurrence is used to set update recurrence : either once (Onetime) or at each interval of time (Interval).
Interval : update interval, only four values are supported : EveryHour, EveryDay, EveryWeek, EveryMonth
MaxUpdateCount : optional, you can set a max number of updates, if none is set, the updater will run indefinitely
StartTime : when will the schedule start
RemoteImageUri : image Uri, must be a 173×173 PNG file. Using transparency is allowed, and very advised (Microsoft loves when you use the user accent color)