我想在下载完成时显示吐司通知。但它不起作用。为什么不起作用?
if (download.Progress.Status == BackgroundTransferStatus.Completed)
{
XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText04);
XmlNodeList stringElements = toastXml.GetElementsByTagName("text");
stringElements[0].AppendChild(toastXml.CreateTextNode("Hello toast"));
ToastNotification toast = new ToastNotification(toastXml);
ToastNotificationManager.CreateToastNotifier(CoreApplication.Id).Show(toast);
}
答案 0 :(得分:2)
您确定应用清单中的应用是否具有吐司功能?