如何在Windows10 IoT上运行ToastNotification?(覆盆子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()));
我正在使用这段代码,它使用了Microsoft UWP Community Toolkit ( https://github.com/Microsoft/UWPCommunityToolkit )。由于某种原因,它不会在PI上显示toast,但在Windows10桌面上显示。
发布于 2018-06-05 06:51:50
Toast通知需要一个shell才能运行。但是,目前Windows IOTCore没有外壳,所以不支持toast通知。同样,文件选择器、徽章通知、磁贴和任何其他需要shell的功能也不受支持。
https://stackoverflow.com/questions/45839737
复制相似问题