我使用下面的代码在我的应用程序中显示一个toastnotifcation:
var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText02);
var image = toastXml.GetElementsByTagName("image")[0];
var title = toastXml.GetElementsByTagName("text")[0];
var text = toastXml.GetElementsByTagName("text")[1];
image.Attributes[1].AppendChild(toastXml.CreateTextNode("ms-appx:///Assets/Images/logovboardnotif.png"));
title.AppendChild(toastXml.CreateTextNode("Board"));
text.AppendChild(toastXml.CreateTextNode(message));
var toastnotifier = ToastNotificationManager.CreateToastNotifier();
var toastnotification = new ToastNotification(toastXml);
toastnotifier.Show(toastnotification);我的问题是,当吐司显示时,会有一个小徽标(天蓝色):

如何隐藏此徽标?
发布于 2013-06-01 00:55:21
更新1
据Programming Windows® 8 Apps with HTML, CSS, and JavaScript by Microsoft Press There are no means to override this; the branding attribute in the XML is ignored for toasts.介绍
您必须将branding属性设置为none,默认值为logo。请参阅here,尝试下面的给定代码。
var xml = @"<toast>
<visual>
<binding template=""ToastImageAndText02"" branding=""none"">
<image id=""1"" src=""{0}""/>
<text id=""1"">{1}</text>
<text id=""2"">{2}</text>
</binding>
</visual>
</toast>";
xml = string.Format(xml, "ms-appx:///Assets/Images/logovboardnotif.png", "Board", message);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xml);
var toastnotification = new ToastNotification(xmlDoc);
ToastNotificationManager.CreateToastNotifier().Show(toastnotification);https://stackoverflow.com/questions/16859301
复制相似问题