Windows 8 Store application WinRT application for local toast does not show

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?

+7
source share
2 answers

Make sure the toast is set in the manifest.

+13
source

hey, and also make sure that you are not testing your application in simulator mode (you need to use local machine mode)! It took me 20 minutes to realize that one of them.

+8
source

All Articles