您好,
我正在測試Windows RT應用程序的Toast Notification。餘設置清單文件中的爲yes「吐司有能力」,並且創建由一個按鈕被稱爲樣品的方法,與此代碼內:
變種toastTemplate = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText01);
var text = toastTemplate.GetElementsByTagName(「text」)[0] as XmlElement; text.AppendChild(toastTemplate.CreateTextNode(「這是 測試!」));
var image = toastTemplate.GetElementsByTagName(「image」)[0] as XmlElement; image.SetAttribute(「src」,String.Format(「ms-appx:/// {0}」, 「Images/rss_logo.png」));
ToastNotification toastNotification = new ToastNotification(toastTemplate); ToastNotifier toastNotifier = ToastNotificationManager.CreateToastNotifier();toastNotifier.Show(toastNotification);
當我清除按鈕,通知出現在屏幕的右上角,但沒有文字和圖像...只是框中,與應用程序的標誌。
你能告訴我我哪裏錯了嗎? 感謝您的幫助。
有你取得你期望什麼或這個問題仍然開放? – Suny 2013-03-28 10:51:06
是的,它解決了。但是我不能在明天之前關閉它(系統拒絕並要求我在關閉之前等待2天)。 – Xstahef 2013-03-28 11:21:40