【问题标题】:Desktop App Toast Notifications OnActivated not firing桌面应用程序 Toast 通知 OnActivated 未触发
【发布时间】:2018-03-02 09:07:32
【问题描述】:

我一直按照 Microsoft 指南 here 中的步骤进行操作,并且我正在使用他们的 github 和 toast 节目中的相同项目,但 OnActivated 方法没有触发,我的实际项目是 WPF 应用程序和Toast 通知显示正确,但 App.xmal.cs 中的 OnActivated 方法再次没有触发。

以前有没有其他人遇到过这个问题?我觉得这与 com 服务器未正确激活有关,但即使 Microsoft 项目不适合我,也很难测试。

我相信这与

有关

【问题讨论】:

    标签: c# wpf toast


    【解决方案1】:

    确保通知中的绑定模板设置为“ToastGeneric”。其他模板用于旧式敬酒,仅触发 OnLaunched()

    例子

    <?xml version="1.0" encoding="utf-8"?>
    <toast launch="{&quot;Url&quot; : &quot;http://cnn.com&quot;}">
    
    <visual><binding template="ToastGeneric">
    <text hint-maxLines="1">Adaptive Tiles Meeting</text>
        <text>Conf Room 2001 / Building 135</text>
        <text>10:00 AM - 10:30 AM</text>
    <image placement="hero" src="https://picsum.photos/364/180?image=1043"/>
    </binding>
    </visual>
    </toast>
    
    

    【讨论】:

      猜你喜欢
      • 2015-04-20
      • 2018-05-27
      • 1970-01-01
      • 2015-12-23
      • 1970-01-01
      • 2017-02-06
      • 1970-01-01
      • 2015-02-01
      • 1970-01-01
      相关资源
      最近更新 更多