1
如何同時更新每個代碼的正方形和寬瓦片? 或者我怎樣才能確定,瓷磚類型是「加載」在開始屏幕上?WP 8.1更新廣場和寬瓦片 - 如何?
我有這樣的代碼:
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實例,這樣做,所有在同一instance..that的更糟糕,那隻能說明廣瓦...
在此先感謝。
問候, ben0bi