Description
Proposal: Modern System Tray Icon
Summary
After a feature proposal to the WinUI team to make system tray icons with WInUI microsoft/microsoft-ui-xaml#2020 and to have followed this discussion #519 and this proposal #711 I would like to offer my take on what the modern way to create system tray icons should look like. A system-managed tray icon accessible for UWP and WIn32 applications respecting the app lifecycle #111 and offering a UI that respects WinUI standards.
We also must take into account that many applications that use the system tray APIs are "service-like" app (that needs 24/7 execution), and so the App Lifecycle API are not suitable in this precise case. The new APIs need to be easy to use on each case.
Rationale
- The system tray icons are not dead and still used a lot.
- A refresh of the UI is necessary to follow the system theme (not the application theme in this case) and to use WinUI for example for the context menu. (Like the One drive system tray icon).
- The actual System tray API needs an app that runs all the time but the management of the context menu and user actions can be handled by the system and through background tasks and app activations.
Scope
Capability | Priority |
---|---|
This proposal will allow UWP and Win32 developers to create System tray icon even if the app respect the app lifecycle | Must |
This proposal will allow developers of Win32 "service-like" app that don't follow the standard lifecycle to create System tray icon | Must |
This proposal will allow UWP and Win32 developers to create System tray icon that respect Windows theme and fluent design | Must |
This proposal will allow UWP and Win32 developers to interact with the System tray icon from background and foreground | Must |
This proposal will allow UWP and Win32 developers to launch his app using his System tray icon | Must |
This proposal will allow UWP and Win32 developers to easily show context menu flyouts associated to the system tray icon | Must |
This proposal will allow end users to run background tasks using the system tray icon | Must |
This proposal will allow end users of a service-like Win32 app to interact directly with the service using the system tray icon | Must |
This proposal will allow end users to interact with the system tray icon using keyboard | Must |
This proposal will allow developers of Win32 "service-like" app to create System tray icon with the same set of APIs | Should |
This proposal will allow UWP and Win32 developers to easily show custom flyouts associated to the system tray icon | Should |
This proposal will allow allow end users to easily interact with the System tray icons using keyboard | Should |
This proposal will allow end users to control background tasks using the system tray icon | Could |
This proposal will allow UWP and Win32 developers to show balloon notifications | Won't |
Important Notes
APIs that could be inspiring
-
The ToastButton API could be an inspiration for the context menu item even if checkbox context menu item and radio context menu item could be supported
-
The ContactPanel API could be a good inspiration for the system tray flyouts.
Open Questions
How the new APIs that will be adapted to short-running applications could also be adapted to long running "service-like" apps ?