Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void sendTileUpdate(string date, string day, string timeformatted)
- {
- //for wide tile
- XmlDocument wideTile = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideText01);
- XmlNodeList wideElement = wideTile.GetElementsByTagName("text");
- //for small tile
- XmlDocument smallTile = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquareText01);
- XmlNodeList smallElement = smallTile.GetElementsByTagName("text");
- //for wide tile
- wideElement.Item(0).AppendChild(wideTile.CreateTextNode(timeformatted));
- wideElement.Item(1).AppendChild(wideTile.CreateTextNode(day));
- wideElement.Item(2).AppendChild(wideTile.CreateTextNode(date));
- TileNotification tile = new TileNotification(wideTile);
- TileUpdateManager.CreateTileUpdaterForApplication().Update(tile);
- //for small tile
- smallElement.Item(0).AppendChild(smallTile.CreateTextNode(timeformatted));
- smallElement.Item(1).AppendChild(smallTile.CreateTextNode(day));
- smallElement.Item(2).AppendChild(smallTile.CreateTextNode(date));
- TileNotification tile2 = new TileNotification(wideTile);
- TileUpdateManager.CreateTileUpdaterForApplication().Update(tile2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement