Microsoft-ui-xaml: Proposal: System tray icon for WinUI 3 Desktop (Win32 and .NET Core)

Created on 24 Feb 2020  路  20Comments  路  Source: microsoft/microsoft-ui-xaml

Proposal: system tray icon for WinUI 3 Desktop (Win32 and .NET Core)

Summary


Add the ability to create NotifyIcon in system tray area. for WinUI 3 Desktop

Rationale

  • Allow user to access to the app anywhere.
  • Allow an app that run in background to propose a context menu.
  • Increase portability of classic Win32 apps based on the system tray model.

Scope


| Capability | Priority |
| :---------- | :------- |
| Allow developers to create system tray icon | Must |
| The system tray context menu should follow Windows Light/Dark theme and fluent design | Should |
| Allow developers to send classic balloon notification | Won't |



area-External feature proposal

Most helpful comment

I think system tray icons should be removed from Windows completely. We should move to having all applications on the task bar for consistency. It is nonsensical to see apps in both places. Why is one app on the task bar and another in the sys-tray, and another in both? There is no logic to it.

If you want some icons on the right and some on the left - we don't need a system tray, what we need is more task bar customization.

Maybe but I am not sure. For me system tray icons don't have the same utility as the taskbar icons:

  • The taskbar icons are for open windowed apps and interact with it.
  • The system tray icons are for background applications (antivirus, cloud synchronization) and allow us to interact with these activities without opening any windows (with context menu and flyouts like OneDrive, the sound icon and many others)

All 20 comments

Windows 10X doesn't support this. I don't think it should be brought back.

@jesbis can you please route this request ?

@shaheedmalik I would argue that just because Windows 10X doesn't support it, it doesn't mean Windows 10 shouldn't. Keep in mind there are over 950 million users of Windows 10.

@marb2000 FYI

I think system tray icons should be removed from Windows completely. We should move to having all applications on the task bar for consistency. It is nonsensical to see apps in both places. Why is one app on the task bar and another in the sys-tray, and another in both? There is no logic to it.

If you want some icons on the right and some on the left - we don't need a system tray, what we need is more task bar customization.

I think system tray icons should be removed from Windows completely. We should move to having all applications on the task bar for consistency. It is nonsensical to see apps in both places. Why is one app on the task bar and another in the sys-tray, and another in both? There is no logic to it.

If you want some icons on the right and some on the left - we don't need a system tray, what we need is more task bar customization.

Maybe but I am not sure. For me system tray icons don't have the same utility as the taskbar icons:

  • The taskbar icons are for open windowed apps and interact with it.
  • The system tray icons are for background applications (antivirus, cloud synchronization) and allow us to interact with these activities without opening any windows (with context menu and flyouts like OneDrive, the sound icon and many others)

Is there another simple, elegant and intuitive way for background process to interact with users, without needing to be a windows based app. If so, then may be system tray is redundant, if that is the only way, then it needs to be retained. I think there are plenty of use cases for it.

An app can be pinned to the Windows 10 Start menu and use the Badge API and Tiles API to inform the user and notify them about app events. Right-clicking on the app's entry in the Start menu opens a context menu which can be populated using the Jumplist API.

In light of 10X removing the notification area I am currently in the process of replacing my app's notification area entry with a Start menu entry using the above mentioned APIs. Users of my apps have been supportive of this change.

10X is not removing a notification area, but only displaying the notifications, without a sidebar.

The quick actions are going in their own separate UI area.

Tray Icons could theoretically be placed in either of those spaces, except that for 10X, they idea of background apps being installed is possibly something they wish to avoid. There are other ways to achieve the same things, but until 10X gets fully detailed, and in the hands of testers - feedback on this will have to wait.

I see no reason why WinUI Desktop apps on Windows 10 will not be able to use Tray Icons. If there is a control or UI surface that could be afforded to the app dev, to enable a consistent Tray UI and UX - I would be in favour of that. Too much inconsistency with flyout, menu styles at present.

@mdtauk With "10X removing the notification area" I mean the area I believe folks here are describing as the "system tray": https://docs.microsoft.com/en-us/windows/win32/uxguide/winenv-notification

@mdtauk With "10X removing the notification area" I mean the area I believe folks here are describing as the "system tray": https://docs.microsoft.com/en-us/windows/win32/uxguide/winenv-notification

System Tray is how I think of it - so I just wanted to distinguish that and the Windows 10 area where notifications are kept.

Action Center is the name of the UI region where notifications are kept in Windows 10. MS seemingly contributes to the confusion by using both "system tray" and "notification area" term for the same UI region, yet the documentation states:
image

As UWP apps do not have direct support for the "system tray" and 10X scraps it entirely (based on the latest info we have) it seems this is not a direction where MS wants to keep going. Consequently, I would rather be interested in why pinning an app to the Start menu and using the above mentioned APIs is not an option compared to putting an app icon in the system tray/notification area.

And if it's not an option we should tell MS why that's the case so they can improve how users can interact with background apps using the UWP Shell interaction concept (Tiles, Badges, Notifications). WinUI 3 Desktop apps asking for notification area (system tray) support will still need a way to notify/inform their users on 10X, which is apparently the future of Windows. I'm not sure if users, who are now asking for system tray support, will not ask MS to add the "system tray" back to 10X as well. As their request likely wouldn't be granted they will have more work to do to make their Windows 10 WinUI app ready for 10X.

As such, I feel we should use this proposal to unify the ideas and concepts of the notification area (system tray) and the new app feedback/interaction areas MS introduced with Windows 8/10. Find out where the current UI is lacking and try to improve it. I don't think much is missing from the current UWP Shell APIs.

Mostly its for apps running without any UI or window, which then opens a window or displays UI when interacted with.

As there is no window open or minimised, there is nothing to switch to on the taskbar, and no window to display in the timeline or task switcher views.

Developers tend to put their app in the system tray because they have a sense that their app is ultra important. As a user, 99% of the time the app isn't as important as the developer thinks.

Right now I have Defender, Bluetooth Devices, Nvidia Settings, Dolby Audio, Ear Trumpet, and OneDrive running in my system tray. Out of all of these, probably only Ear Trumpet needs to be down there. The rest are not that important. Even Defender could tell me what I need to know from the Action Center.

Right now I have Defender, Bluetooth Devices, Nvidia Settings, Dolby Audio, Ear Trumpet, and OneDrive running in my system tray. Out of all of these, probably only Ear Trumpet needs to be down there

Not important to you, however, they are important to me and many Windows users. Without system tray, they will move to taskbar which is worse.

System tray is primarily a place for services and background apps to show they are running while allowing some from of control over it's state without polluting the main taskbar. They are intended for at-a-glance status with quick interactions.

Apps in taskbar are intended to show apps you would interact with in the foreground for longer periods of time. This allows task switching between multiple foreground apps.

Messaging apps fit in the middle. For a long-time they minimized to system tray because they are mostly background and not interacted with until a message pops in or you open it to message someone. If it is a primary, daily messaging app for work, I pin it to my taskbar for primary work. However, some apps are rarely used anymore and clutter so I keep them minimized in system tray until every once and while I need it.

What I don't want is to think my messaging app is running and come to find out it is not, and I have 20 missed messages.

System tray has it's real use, but I get it, it's challenging. The more apps you install, the more clutter and potential abuse of a feature. For example, apps launching on startup or login. Useful, but abused heavily. However, removing it just because it's clutter and abused is the wrong approach. User control and now AI for managing what shows up and where are the best ways to handle the problem.

With Windows 8 and 10X that Microsoft is rethinking many paradigms to see how can they advance the OS. The problem is, Windows 95, XP, 7 got so many paradigms right, that you can't really remove them without breaking lots of user stories. It's hard to innovate on a 2D space when you already solved the problem better than other methods! The other challenge is real estate on smaller screens.

With Windows 10X, they don't have background apps working so not having a system tray built yet makes sense. I think once they bring back background apps and services, they will find a way to bring the tray back, but maybe in a different form than what we are used to so they can solve the real estate problem.

@mdtauk

Mostly its for apps running without any UI or window, which then opens a window or displays UI when interacted with.

Using the Start menu as described above can work just fine for those types of apps. I have such an app myself which can start completely minimized (no taskbar app icon, no app window) yet I can use the Badge API and notifications to inform the user when something happened and they can decide to bring it to the foreground using the Start menu (just as they would with the notification area app icon).

A potential Shell improvement: After discussing with others, it was suggested that, for example, the app's context menu shown in the Start menu could be improved to allow multi-level hierarchy or UI elements such as checkboxes and radio buttons as those can be easily added to Win32 notification area context menus today.

In general, it would be useful to get a wide variety of "system tray" app context menus in use today, see how they designed and where exactly the UWP Shell APIs are lacking today.

PS: Here is a blog post by Raymond Chen clarifying that "system tray" is not the correct terminology and "notification area" should be used instead: https://devblogs.microsoft.com/oldnewthing/20030910-00/?p=42583

Using the Start menu as described above can work just fine for those types of apps.

I strongly disagree. I don't know your app so I can't speak to your user story but a whole class of apps do not work well buried inside hidden surfaces such as Start Menu or Action Center. These apps include: signal strength indicators, battery level, CPU/GPU Temperatures, Sync statuses, Message Indicators, etc.

How can we classify all these apps to better understand them? I think we understand notification apps quite well and Action Center helped improve their use cases. But the other apps fit better as "Monitoring". Monitoring is not the same as Alerts and Notifications which is a common misconception.

Monitoring is about seeing the status at all times. The ability to quickly look over every once and while with no additional action, and move on. Battery level is a good one for this. I can glance over at a battery indicator and see how my battery is doing. I want notifications for critical events like low battery but I don't want notifications for 70%, 50%, or 30%. I just want to look over and check it. Guess what,, time is the same thing! I look over to see time without further action, hence why it is in the Taskbar Notification Area! These may be considered system OS but there are many apps that provide similar functionality that the OS does not have.

Now, does this mean every app should be in the notification area like today? Is it abused because there was no other good place for it before? Sure. I think a lot of improvements can and are being made here. Quick Actions/Control Center has the potential to replace many types of apps in this regard. But, that can quickly get bloated too, making it hard to find the "quick actions".

_"Changing the paradigm doesn't solve the problem, it just moves the problem to a different space"_

Moving apps to pinned taskbar just bloats the taskbar
Moving apps to Start Menu means you have to pin the apps first, then actively click on Start to check it
Moving apps to Quick Actions loses the ability to distinguish between all the other quick actions.

This is why Live Tiles has not gained traction outside of Windows Phone, they are buried in a hidden surface so they lose their usefulness and full potential. On Windows Phone, the desktop and start launcher are merged to same thing making it useful there. On Windows 8+, desktop and taskbar are your main visibility points. Hence why Live Tiles on Desktop is a popular request since it would likely be nearly always visible on larger screens.

Let's be mindful that there is a purpose for all things. We can certainly look at moving things around but we need to understand the full classification of apps and if they would truly benefit in moving or do they lose their usefulness and purpose as a result.

Windows 10X is still far from complete and until we know more, we shouldn't assume anything. This proposal is for fixing a gap in UWP / WinUI that needs to be resolved to fit in the breadth of how Windows is used. This is not going away anytime soon.

I'd like the system tray experience to be revamped if possible. Something similar to macOS' menu bar apps.

Messaging apps fit in the middle. For a long-time they minimized to system tray because they are mostly background and not interacted with until a message pops in or you open it to message someone. If it is a primary, daily messaging app for work, I pin it to my taskbar for primary work. However, some apps are rarely used anymore and clutter so I keep them minimized in system tray until every once and while I need it.

What I don't want is to think my messaging app is running and come to find out it is not, and I have 20 missed messages.

This would be a problem with the notification system. As Windows evolved, one doesn't need a system tray icon running just to notify you of potential messages. One can receive messages without cluttering up the system tray.

For me, the use case for the tray icons is simple: I want to see the apps that run in the background there and for the icon in the tray to indicate either a continuous status (e.g. a CPU load/temperature indicator) or a discrete indicator that something's happened (say a messaging app icon saying that I got a new message). The actual message notifications go to the action center. If the app is not open and minimized to the taskbar or to the tray, I don't want it to be running at all. I'd like to be able to reliably tell if the app is running in the background or turned off. Basically, all the messengers used to work this way (by being a win32 app or by utilizing a win32 bridge companion app).

Was this page helpful?
0 / 5 - 0 ratings