Skip to content

Instantly share code, notes, and snippets.

@ridomin
Created January 19, 2017 21:44
Show Gist options
  • Save ridomin/2b4d522235829dddf13dc5c810b1d290 to your computer and use it in GitHub Desktop.
Save ridomin/2b4d522235829dddf13dc5c810b1d290 to your computer and use it in GitHub Desktop.
ToastTemplateType toastTemplate = ToastTemplateType.ToastText02;
XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplate);
XmlNodeList toastTextElements = toastXml.GetElementsByTagName("text");
toastTextElements[0].AppendChild(toastXml.CreateTextNode("msg"));
toastTextElements[1].AppendChild(toastXml.CreateTextNode(DateTime.Now.ToString()));
ToastNotification toast = new ToastNotification(toastXml);
ToastNotificationManager.CreateToastNotifier().Show(toast);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment