【问题标题】:No ToastNotification on Windows 10 IoT (RPI2)Windows 10 IoT (RPI2) 上没有 ToastNotification
【发布时间】:2018-06-05 06:51:50
【问题描述】:

如何让 ToastNotification 在 Windows 10 IoT 上运行? (树莓派 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 社区工具包 (https://github.com/Microsoft/UWPCommunityToolkit)。 出于某种原因,它不会在 PI 上显示 toast,但在 Windows 10 桌面上会显示。

【问题讨论】:

  • 目前,Windows 10 IoT 核心似乎不支持此功能。

标签: c# iot windows-10-iot-core windowsiot windows-community-toolkit


【解决方案1】:

Toast 通知需要 shell 才能运行。但是,目前,Windows IOTCore 没有外壳,因此不支持 toast 通知。同样,也不支持文件选择器、徽章通知、磁贴和任何其他需要外壳的功能。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-08
    • 1970-01-01
    • 2019-08-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多