Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. <tile>
  2. <visual lang="en-US">
  3. <binding template="TileWideSmallImageAndText04">
  4. <image id="1" src="URLOFIMG" alt="alt text"/>
  5. <text id="1">Some Text</text>
  6. <text id="2">Text Field 2</text>
  7. </binding>
  8. <binding template="TileWideSmallImageAndText04">
  9. <image id="1" src="URL2" alt="alt text"/>
  10. <text id="1">SOME TEXT</text>
  11. <text id="2">Text Field 2</text>
  12. </binding>
  13. <binding template="TileWideSmallImageAndText04">
  14. <image id="1" src="URL" alt="alt text"/>
  15. <text id="1">TEXT</text>
  16. <text id="2">Text Field 2</text>
  17. </binding>
  18. </visual>
  19. </tile>
  20.  
  21. private void SendTileNotificationWithStringManipulation_Click(object sender, RoutedEventArgs e)
  22. {
  23. Button button = sender as Button;
  24. if (button != null)
  25. {
  26. string tileXmlString = "<tile>"
  27. + "<visual>"
  28. + "<binding template='TileWideText04'>"
  29. + "<text id='1'>Send to a secondary tile from strings</text>"
  30. + "</binding>"
  31. + "<binding template='TileSquareText04'>"
  32. + "<text id='1'>Send to a secondary tile from strings</text>"
  33. + "</binding>"
  34. + "</visual>"
  35. + "</tile>";
  36.  
  37. Windows.Data.Xml.Dom.XmlDocument tileDOM = new Windows.Data.Xml.Dom.XmlDocument();
  38. tileDOM.LoadXml(tileXmlString);
  39. TileNotification tile = new TileNotification(tileDOM);
  40.  
  41. // Send the notification to the secondary tile by creating a secondary tile updater
  42. TileUpdateManager.CreateTileUpdaterForSecondaryTile(MainPage.dynamicTileId).Update(tile);
  43.  
  44. rootPage.NotifyUser("Tile notification sent to " + MainPage.dynamicTileId, NotifyType.StatusMessage);
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement