microsoft / microsoft/WindowsAppSDK

Modern System Tray Icon

Open
#713 48 comments 57 reactions 0 assignees View on GitHub
area-Shell UX feature proposal
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

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](https://docs.microsoft.com/dotnet/api/microsoft.toolkit.uwp.notifications.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](https://docs.microsoft.com/windows/uwp/contacts-and-calendar/my-people-support) 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 ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the related proposals and discussions in microsoft/microsoft-ui-xaml#2020 and WindowsAppSDK issues #519, #711, and #111, then compare them with the Project Reunion roadmap. Done means reaching agreement on the system-tray API scope, lifecycle behavior for UWP, Win32, and service-like apps, and the outstanding open question.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.