How to get the ToastNotification working on Windows 10 IoT? (Raspberry Pi 2).
ToastBindingGeneric binding = new ToastBindingGeneric();
binding.Children.Add(new AdaptiveText() { Text = "Foo" });
binding.Children.Add(new AdaptiveText() { Text = "Trying to do something here hello!!!" });
ToastContent content = new ToastContent()
{
Visual = new ToastVisual()
{
BindingGeneric = binding
}
};
ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(content.GetXml()));
I'm using this code, it uses the Microsoft UWP Community Toolkit ( https://github.com/Microsoft/UWPCommunityToolkit ). For some reason it does not show a toast on the PI, but on Windows 10 desktop it does.