【问题标题】:[UWP]- OnActivated Event not calling[UWP]- OnActivated 事件未调用
【发布时间】:2015-11-14 13:47:24
【问题描述】:

我有启用通知的 Windows 8 应用程序。它在 Windows 8、8.1 和 Windows 10 机器上也很有效。 但我遇到的问题是,当用户点击通知时,它会从 Windows 8 和 8.1 应用程序中的 LAunchEvent 获取启动属性,并按预期基于 toast 通知的启动参数。如果用户点击通知,就好像我在 Windows 10 机器上运行应用程序一样,我无法读取 toast 通知的 Launch 属性。 那么谁能指导我该怎么做?

【问题讨论】:

    标签: windows-store-apps win-universal-app uwp


    【解决方案1】:

    请参阅“处理来自 toast 通知的激活”部分http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/07/09/quickstart-sending-a-local-toast-notification-and-handling-activations-from-it-windows-10.aspx

    如果您使用的是新的 Win 10 模板或自定义操作,那么您必须在 OnActivated 处理程序中处理启动事件/参数。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-21
      • 2020-10-19
      • 2020-01-03
      • 1970-01-01
      • 2018-05-27
      • 2018-06-23
      • 1970-01-01
      • 2019-03-30
      相关资源
      最近更新 更多