© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
1 reply
Luc ♡

Is there any reason I should not use Winforms NotifyIcon on windows with maui?

I never did a tray icon before, so naturally i googled. I stumbled upon this after a while https://github.com/dotnet/maui-samples/blob/main/8.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Platforms/Windows/NativeWindowing/WindowsTrayIcon.cs

However that had no way of doing a context menu on the tray icon.
Then I figured out you can just use System.WIndows.Forms.NotifyIcon for it, and it would just work.

Is there any reason I should not be using this on a windows compile target for my maui app? Why is there this alternative way of poking win apis directly?
image.png
GitHub
maui-samples/8.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Platfor...
Samples for .NET Multi-Platform App UI (.NET MAUI) - dotnet/maui-samples
maui-samples/8.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Platfor...
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Should i start with MAUI?
C#CC# / help
2y ago
✅ Should I use WinForms or WPF for my Windows x32 projects?
C#CC# / help
2y ago
✅ I'can open windows app with maui
C#CC# / help
4y ago