Created
May 23, 2013 02:30
-
-
Save anaisbetts/5632430 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var toast = ToastContentFactory.CreateToastText02(); | |
var item = x.First(); | |
toast.TextHeading.Text = item.Subject.Type; | |
toast.TextBodyWrap.Text = "DO IT"; | |
toast.Lang = "en_US"; | |
toast.BaseUri = "http://google.com"; | |
toast.Duration = BoxKite.Notifications.ToastDuration.Long; | |
toast.StrictValidation = false; | |
ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(toast.GetXml())); |
This works for me:
var toast = ToastContentFactory.CreateToastText02();
toast.TextHeading.Text = "A Thing!";
toast.TextBodyWrap.Text = "DO IT";
toast.Lang = "en-US";
toast.BaseUri = "http://google.com";
toast.Duration = BoxKite.Notifications.ToastDuration.Long;
toast.StrictValidation = false;
ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(toast.GetXml()));
Lang was en_US
when it needs to be en-US
. I think that's all that was missing.
Apparently assigning .Lang makes it not appear.
You can use the Event Log to check for errors when your toast notification does not display. Look for events involving your toast notification in the Event Viewer under Applications and Services Logs > Microsoft > Windows > Immersive-Shell > Microsoft-Windows-TWinUI > Operational.
Anything there that might help?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TO THE MANIFEST