We’re still missing functionality to show the text, or show the text and an image where both are specified.
Add text
Let’s start with the text field. It’s currently just hard coded - that’s pretty straightforward:
Text
Next, let’s hook this up to the command.
[sourcecode language=“XML”] Update
So that works, and the logic to show the text tile is quite straightforward:
``` csharp
public static void UpdateTileText(string text)
{
XmlDocument xmlDoc = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150Text01);
XmlElement textNode = (XmlElement)xmlDoc.GetElementsByTagName("text")[0];
textNode.InnerText = text;
Windows.UI.Notifications.TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
TileNotification tileNotification = new TileNotification(xmlDoc);
tileUpdater.Update(tileNotification);
}
So, we can call this, or we can call the UpdateImage. At the moment, we can’t call both. In the next post I’ll look at how we can do this using Multibinding.