带有通用应用程序的系统托盘/任务栏图标/通知图标 [英] System tray/taskbar icon/notify icon with universal apps

查看:31
本文介绍了带有通用应用程序的系统托盘/任务栏图标/通知图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何 API 可用于在通用应用程序中创建系统托盘图标,或者这是一个禁忌?在这种情况下,我应该改用什么,我可以以某种方式将我的应用程序集成到操作中心还是仅限 MS?

Is there any API I can use to create systray icons in universal apps, or is this a no-no? In that case, what should I use instead, can I somehow integrate my app into the action center or is that MS-only?

推荐答案

很抱歉,但我认为这是不可能的:唯一的选择是开发一个配套的 win32 程序来创建图标并建立某种通信两者之间(win32 应用程序可以启动 UWP 应用程序,UWP 可以将状态信息发送到 win32 应用程序).这意味着必须安装另一个问题之一,这并非微不足道,许多用户不会喜欢后台任务.

I'm sorry but I think that is not possible: the only option would be to develop a companion win32 program that creates the icon and establish some sort of communication between both (the win32 app could launch the UWP app, and the UWP could send status info to the win32 app). That would mean that one of the problems should have to install the other one, it is not trivial and many users won't like to have background tasks.

我认为您应该尝试适应 W10 UX:将动态磁贴用于任何状态/通知,允许固定执行某些操作的辅助动态磁贴,并与 Cortana 集成.

I think you should try to adapt to the W10 UX: use a live tile for any status/notification, allow to pin secondary live tiles that perform certain actions, and integrate with Cortana.

无法集成到操作中心,除非您想创建一个永久通知,在单击时执行某些操作,但这可能会惹恼用户.

Integration in the action center is not possible, unless you want to create a permanent notification that performs some action when clicked, but that would probably annoy users.

编辑 (6/24/2017):现在可以使用 Win32 扩展将此功能添加到 UWP 应用程序,请参阅 本教程 供参考.

Edit (6/24/2017): It is now possible to use Win32 extensions to add this functionality to a UWP app, see this tutorial for reference.

这篇关于带有通用应用程序的系统托盘/任务栏图标/通知图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆