如何一次更新每个代码的正方形和宽图块?或者我如何确定在开始屏幕上“加载”了哪种瓷砖类型?
我有这个代码:
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);
}
}
...它所做的是,它更新了宽瓷砖。但如果它是方形瓷砖,那么它会更新它......有时。大多数时候,它是空的。所以,它以某种方式起作用。但是不对....
有人能帮我一下吗?
PS:我还尝试获取 TileUpdater 实例并在同一个实例中执行所有操作……更糟糕的是,它只显示宽瓷砖……
提前致谢。
问候, ben0bi