<tfoot id='8kkWg'></tfoot>

<small id='8kkWg'></small><noframes id='8kkWg'>

  • <i id='8kkWg'><tr id='8kkWg'><dt id='8kkWg'><q id='8kkWg'><span id='8kkWg'><b id='8kkWg'><form id='8kkWg'><ins id='8kkWg'></ins><ul id='8kkWg'></ul><sub id='8kkWg'></sub></form><legend id='8kkWg'></legend><bdo id='8kkWg'><pre id='8kkWg'><center id='8kkWg'></center></pre></bdo></b><th id='8kkWg'></th></span></q></dt></tr></i><div id='8kkWg'><tfoot id='8kkWg'></tfoot><dl id='8kkWg'><fieldset id='8kkWg'></fieldset></dl></div>

    <legend id='8kkWg'><style id='8kkWg'><dir id='8kkWg'><q id='8kkWg'></q></dir></style></legend>
        <bdo id='8kkWg'></bdo><ul id='8kkWg'></ul>

      1. 使用来自桌面应用程序的 Windows 8 Toast 通知

        Use Windows 8 toast notification from desktop app(使用来自桌面应用程序的 Windows 8 Toast 通知)
      2. <tfoot id='VbzRR'></tfoot>
          <i id='VbzRR'><tr id='VbzRR'><dt id='VbzRR'><q id='VbzRR'><span id='VbzRR'><b id='VbzRR'><form id='VbzRR'><ins id='VbzRR'></ins><ul id='VbzRR'></ul><sub id='VbzRR'></sub></form><legend id='VbzRR'></legend><bdo id='VbzRR'><pre id='VbzRR'><center id='VbzRR'></center></pre></bdo></b><th id='VbzRR'></th></span></q></dt></tr></i><div id='VbzRR'><tfoot id='VbzRR'></tfoot><dl id='VbzRR'><fieldset id='VbzRR'></fieldset></dl></div>
              <tbody id='VbzRR'></tbody>
              <bdo id='VbzRR'></bdo><ul id='VbzRR'></ul>
              <legend id='VbzRR'><style id='VbzRR'><dir id='VbzRR'><q id='VbzRR'></q></dir></style></legend>

                  <small id='VbzRR'></small><noframes id='VbzRR'>

                • 本文介绍了使用来自桌面应用程序的 Windows 8 Toast 通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我开发了一个桌面应用程序,它是一个用于 Windows 的简单 .exe.

                  它在 Windows 8 上运行良好.

                  我现在尝试使用吐司通知"向用户显示一些警报.

                  所以我使用 Microsoft 示例进行了培训,可在此处获取:http:///code.msdn.microsoft.com/windowsdesktop/sending-toast-notifications-71e230a2/

                  它工作正常,但我必须为我的应用创建一个快捷方式才能使用 toast 通知.

                  我试图删除快捷方式创建,但它不起作用.我明白,因为对于桌面应用程序,快捷方式是 Toast 通知的先决条件,您可以在 Microsoft 网站上阅读:http://msdn.microsoft.com/en-us/library/windows/apps/hh802768.aspx

                  我的问题很简单.如果用户决定删除快捷方式(在他的个人资料文件夹中是一个 .lnk),如果没有这个快捷方式,我的 toast 通知如何工作?

                  如果没有创建快捷方式,我不想每次都在运行时创建快捷方式,因为用户决定删除它,而每次都创建它是不正确的.

                  那么,有没有办法在没有快捷方式的情况下使用来自桌面应用程序的 toast 通知?

                  解决方案

                  文档 似乎很清楚:

                  <块引用>

                  您的应用的快捷方式,带有 System.AppUserModel.ID,必须是安装到开始屏幕.但是请注意,它不需要固定到开始"屏幕.有关更多信息,请参阅如何启用通过 AppUserModelID 的桌面 Toast 通知.

                  请注意,已固定"和已安装"是有区别的,如果您可以在不固定的情况下进行安装(不确定是否可以),那么用户将不太可能找到并删除它.

                  也就是说,永远不能保证快捷方式会在那里.也许您的应用在启动时(或任何时候)可以检测到快捷方式消失了,并轻轻地"通知用户他们的应用体验将不是最佳的,然后提供恢复快捷方式(您可以通过编程方式进行).

                  请记住,用户始终可以逐个应用程序或系统范围内关闭应用程序上的通知,因此删除快捷方式只是最终用户可能看不到您的通知的方式之一.

                  I developed a desktop app, which is a simple .exe for Windows.

                  It works fine on Windows 8.

                  I try now to use "toast notification" to show some alert for user.

                  So I trained with Microsoft sample, available here: http://code.msdn.microsoft.com/windowsdesktop/sending-toast-notifications-71e230a2/

                  It works fine, but I have to create a shortcut to my app to use toast notification.

                  I tried to remove shortcut creation, but it doesn't work. And I understand, because for desktop app, shortcut is a prerequesite for toast notification, as you can read on Microsoft website: http://msdn.microsoft.com/en-us/library/windows/apps/hh802768.aspx

                  My question is simple. If user decide to delete shortcut (which is a .lnk in his profile folder), how can make my toast notification work without this shortcut ?

                  I don't want to create shortcut every time on runtime if it's not created, because user decided to delete it, and create it every time is not correct.

                  So, is there any way to use toast notification from desktop app without shortcut ?

                  解决方案

                  The documentation you quoted seems pretty clear:

                  A shortcut to your app, with a System.AppUserModel.ID, must be installed to the Start screen. Note, however, that it does not need to be pinned to the Start screen. For more information, see How to enable desktop toast notifications through an AppUserModelID.

                  Note there's a distinction between "pinned" and "installed", if you can install without pinning (unsure if you can) it would be less likely user would find and delete it.

                  That said, there's never any guarantee the shortcut will be there. Perhaps your app on launch (or whenever) could detect that the shortcut is gone and "gently" inform the user that their app experience will be less than optimal, then offer to reinstate the shortcut (which you'd do programmatically).

                  Keep in mind the user can always turn off notifications on an app by app basis or system-wide anyway, so removing the shortcut is only one of the ways the end user might not see your notifications.

                  这篇关于使用来自桌面应用程序的 Windows 8 Toast 通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  C++ stl unordered_map implementation, reference validity(C++ stl unordered_map 实现,参考有效性)
                  C++: Is it possible to use a reference as the value in a map?(C++:是否可以使用引用作为映射中的值?)
                  Where ampersand quot;amp;quot; can be put when passing argument by reference?(其中符号“amp;通过引用传递参数时可以放置吗?)
                  Why can a non-const reference parameter be bound to a temporary object?(为什么可以将非常量引用参数绑定到临时对象?)
                  What is a dangling reference?(什么是悬空引用?)
                  C++ reference changes when push_back new element to std::vector(当 push_back 新元素到 std::vector 时,C++ 引用发生变化)
                    1. <small id='JcMc0'></small><noframes id='JcMc0'>

                      <i id='JcMc0'><tr id='JcMc0'><dt id='JcMc0'><q id='JcMc0'><span id='JcMc0'><b id='JcMc0'><form id='JcMc0'><ins id='JcMc0'></ins><ul id='JcMc0'></ul><sub id='JcMc0'></sub></form><legend id='JcMc0'></legend><bdo id='JcMc0'><pre id='JcMc0'><center id='JcMc0'></center></pre></bdo></b><th id='JcMc0'></th></span></q></dt></tr></i><div id='JcMc0'><tfoot id='JcMc0'></tfoot><dl id='JcMc0'><fieldset id='JcMc0'></fieldset></dl></div>
                        • <bdo id='JcMc0'></bdo><ul id='JcMc0'></ul>
                          <legend id='JcMc0'><style id='JcMc0'><dir id='JcMc0'><q id='JcMc0'></q></dir></style></legend>

                            <tfoot id='JcMc0'></tfoot>

                              <tbody id='JcMc0'></tbody>