Answered by:
Building a simple live tile whiсh refreshes from a timer

Question
-
Hi everyone. I am trying to build a live tile for my app. Live tile should just show some short text from the property I have inside of my application (let's call it 'Property'). I just want to show the text currently available if you do 'get' on 'Property', and refresh the text on live tile when some internall timer ticks (or just when I RaisePropertyChangedEvent, any of these 2 options will work for me). I tried to look for needed info on MS site but with no luck. Can you please point me to the needed title, or maybe just give the idea of how to do this?
- Edited by Макс Хайтович Monday, November 18, 2013 3:48 PM
Monday, November 18, 2013 3:30 PM
Answers
-
use the TileUpdateManager class
var updater = TileUpdateManager.CreateTileUpdaterForApplication(); var template = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150ImageAndText02); updater.Update(new TileNotification(template));
Microsoft Certified Solutions Developer - Windows Store Apps Using C#
- Marked as answer by Макс Хайтович Wednesday, November 20, 2013 6:50 AM
Monday, November 18, 2013 10:00 PM
All replies
-
use the TileUpdateManager class
var updater = TileUpdateManager.CreateTileUpdaterForApplication(); var template = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150ImageAndText02); updater.Update(new TileNotification(template));
Microsoft Certified Solutions Developer - Windows Store Apps Using C#
- Marked as answer by Макс Хайтович Wednesday, November 20, 2013 6:50 AM
Monday, November 18, 2013 10:00 PM -
Thanks, will try it. But how to link text on live tile to text in property?Tuesday, November 19, 2013 1:08 PM
-
There is no direct link. You'll have to update the tile as Dave suggested when the property changes.Tuesday, November 19, 2013 4:06 PMModerator
-
Thanks. So to sum up I'll have to create new tile (as far as I see it is declared as an xml) and pull TileUpdateManager each time I will need to refresh the tile.Wednesday, November 20, 2013 6:51 AM