Skip to content

Instantly share code, notes, and snippets.

@yesez
Created April 10, 2013 06:04
Show Gist options
  • Save yesez/5352171 to your computer and use it in GitHub Desktop.
Save yesez/5352171 to your computer and use it in GitHub Desktop.
private void CrearTostadaSinExtensions()
{
XmlDocument toastXML = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);
XmlNodeList toastText = toastXML.GetElementsByTagName("text");
toastText[0].InnerText = "Notificación";
toastText[1].InnerText = "Esta es una notificación que NO usa NotificationExtensions";
ToastNotification toast = new ToastNotification(toastXML);
ToastNotificationManager.CreateToastNotifier().Show(toast);
}
private void CrearTostadaConExtensions()
{
IToastText02 toastContent = ToastContentFactory.CreateToastText02();
toastContent.TextHeading.Text = "Notificación";
toastContent.TextBodyWrap.Text = "Esta es una notificación que SI usa NotificationExtensions";
ToastNotification toast = toastContent.CreateNotification();
ToastNotificationManager.CreateToastNotifier().Show(toast);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment