Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tile>
- <visual lang="en-US">
- <binding template="TileWideSmallImageAndText04">
- <image id="1" src="URLOFIMG" alt="alt text"/>
- <text id="1">Some Text</text>
- <text id="2">Text Field 2</text>
- </binding>
- <binding template="TileWideSmallImageAndText04">
- <image id="1" src="URL2" alt="alt text"/>
- <text id="1">SOME TEXT</text>
- <text id="2">Text Field 2</text>
- </binding>
- <binding template="TileWideSmallImageAndText04">
- <image id="1" src="URL" alt="alt text"/>
- <text id="1">TEXT</text>
- <text id="2">Text Field 2</text>
- </binding>
- </visual>
- </tile>
- private void SendTileNotificationWithStringManipulation_Click(object sender, RoutedEventArgs e)
- {
- Button button = sender as Button;
- if (button != null)
- {
- string tileXmlString = "<tile>"
- + "<visual>"
- + "<binding template='TileWideText04'>"
- + "<text id='1'>Send to a secondary tile from strings</text>"
- + "</binding>"
- + "<binding template='TileSquareText04'>"
- + "<text id='1'>Send to a secondary tile from strings</text>"
- + "</binding>"
- + "</visual>"
- + "</tile>";
- Windows.Data.Xml.Dom.XmlDocument tileDOM = new Windows.Data.Xml.Dom.XmlDocument();
- tileDOM.LoadXml(tileXmlString);
- TileNotification tile = new TileNotification(tileDOM);
- // Send the notification to the secondary tile by creating a secondary tile updater
- TileUpdateManager.CreateTileUpdaterForSecondaryTile(MainPage.dynamicTileId).Update(tile);
- rootPage.NotifyUser("Tile notification sent to " + MainPage.dynamicTileId, NotifyType.StatusMessage);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement