Reputation: 1000
I want to show toast notification when downloading is completed.But it doesn't work.Why doesn't work ?
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);
}
Upvotes: 0
Views: 537
Reputation: 29953
Have you made sure your app is toast-capable in the app manifest?
Upvotes: 2