您好,
我正在测试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