How do I update both, the square and the wide tile per code at once? Or how can I determine, wich tile type is "loaded" on the start screen?
I have this code:
private void JamesBond()
{
var tileXML = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150Text01);
var tileText = tileXML.GetElementsByTagName("text");
(tileText[0] as XmlElement).InnerText = "First text";
(tileText[1] as XmlElement).InnerText = "Second text";
(tileText[2] as XmlElement).InnerText = "Third text";
(tileText[3] as XmlElement).InnerText = "Last text";
var tileNotification = new TileNotification(tileXML);
var tileXMLw = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150Text01);
var tileTextw = tileXMLw.GetElementsByTagName("text");
(tileTextw[0] as XmlElement).InnerText = "Wide First text";
(tileTextw[1] as XmlElement).InnerText = "Wide Second text";
(tileTextw[2] as XmlElement).InnerText = "Wide Third text";
(tileTextw[3] as XmlElement).InnerText = "Wide Last text";
var tileNotificationW = new TileNotification(tileXMLw);
TileUpdateManager.CreateTileUpdaterForApplication().Clear();
TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotificationW);
}
}
...and what it does is, it updates the wide tile. But if it is the square tile, then it updates it.....sometimes. And most of the time, it's empty. So, somehow it works. But not right....
Can anyone help me here?
PS: I also tried to get the TileUpdater instance and do that all in the same instance..that's even worse, it only shows the wide tile...
Thanks in advance.
Regards, ben0bi