SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     private void sendTileUpdate(string date, string day, string timeformatted)
  2.         {  
  3.             //for wide tile
  4.             XmlDocument wideTile = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideText01);
  5.             XmlNodeList wideElement = wideTile.GetElementsByTagName("text");
  6.  
  7.             //for small tile
  8.             XmlDocument smallTile = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquareText01);
  9.             XmlNodeList smallElement = smallTile.GetElementsByTagName("text");
  10.  
  11.             //for wide tile
  12.             wideElement.Item(0).AppendChild(wideTile.CreateTextNode(timeformatted));
  13.             wideElement.Item(1).AppendChild(wideTile.CreateTextNode(day));
  14.             wideElement.Item(2).AppendChild(wideTile.CreateTextNode(date));
  15.             TileNotification tile = new TileNotification(wideTile);
  16.             TileUpdateManager.CreateTileUpdaterForApplication().Update(tile);                  
  17.  
  18.             //for small tile
  19.             smallElement.Item(0).AppendChild(smallTile.CreateTextNode(timeformatted));
  20.             smallElement.Item(1).AppendChild(smallTile.CreateTextNode(day));
  21.             smallElement.Item(2).AppendChild(smallTile.CreateTextNode(date));
  22.             TileNotification tile2 = new TileNotification(wideTile);
  23.             TileUpdateManager.CreateTileUpdaterForApplication().Update(tile2);
  24.            
  25.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top