I have the following code to show a toast notification locally in a C# / XAML Windows Store app:
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);
}
The toast is never shown in the UI. You can try it with an empty default VS 2012 Windows Store app project and this code. Is there something that needs to be configured first?
Make sure that you have “toast capable” set in the manifest.