I have the following code to show a toast notification locally in a C # / XAML application for the Windows Store:
private static void ShowToast(string message) { var toastXmlString = string.Format("<toast><visual version='1'><binding template='ToastText01'><text id='1'>{0}</text></binding></visual></toast>", message); var xmlDoc = new Windows.Data.Xml.Dom.XmlDocument(); xmlDoc.LoadXml(toastXmlString); var toast = new ToastNotification(xmlDoc); ToastNotificationManager.CreateToastNotifier().Show(toast); }
A toast is never displayed in the user interface. You can try it with an empty Windows Store Windows 2012 app project and this code. Is there anything you need to configure first?
Rene schulte
source share