1
我想在我的Windows 8應用程序中的瓷磚顯示徽章。我試過下面的代碼,並沒有得到瓷磚中的徽章。沒有錯誤顯示出來。我沒有得到什麼問題。我堅持了2個小時。徽章到我的窗戶中的瓷磚8應用程序
var notifications = Windows.UI.Notifications;
var badgeType = notifications.BadgeTemplateType.badgeNumber;
var badgeXml = notifications.BadgeUpdateManager.getTemplateContent(badgeType);
var badgeAttributes = badgeXml.getElementsByTagName("badge");
badgeAttributes[0].setAttribute("value", "7");
var badgeNotification = new notifications.BadgeNotification(badgeXml);
notifications.BadgeUpdateManager.createBadgeUpdaterForApplication().update(badgeNotification);
更新
嗨上面的代碼爲我工作在Windows8的桌面,但是當我運行在模擬器它沒有顯示的徽章text.Can有人幫我這個
謝謝你的回答。我會檢查本地機器。 – 2013-05-09 06:46:18