NativeTray 2.0.1
dotnet add package NativeTray --version 2.0.1
NuGet\Install-Package NativeTray -Version 2.0.1
<PackageReference Include="NativeTray" Version="2.0.1" />
<PackageVersion Include="NativeTray" Version="2.0.1" />
<PackageReference Include="NativeTray" />
paket add NativeTray --version 2.0.1
#r "nuget: NativeTray, 2.0.1"
#:package NativeTray@2.0.1
#addin nuget:?package=NativeTray&version=2.0.1
#tool nuget:?package=NativeTray&version=2.0.1
NativeTray
NativeTray is a modern, easy-to-use library for displaying tray icons (NotifyIcon) in .NET applications. It supports WPF, WinForms, and other .NET platforms, providing non-intrusive system notifications and quick access functionality in the Windows taskbar.
Supports dark mode, custom icons, checkable menu items, and submenus.
Features
- Native Win32 tray icon integration.
- Context menu with checkable, disabled, and bold items.
- Balloon notifications with custom title, text, and icon.
- Theme mode support (light, dark, system).
- High DPI support for crisp icon rendering.
- Easy API for menu and icon management.
Usage
Install NativeTray via NuGet:
dotnet add package NativeTray
Example usage:
using System.NativeTray;
var trayIcon = new TrayIconHost
{
ToolTipText = "NativeTray Demo.",
Icon = ... // Load your icon handle here.
};
trayIcon.Menu = new TrayMenu
{
new TrayMenuItem { Header = "Item 1", Command = new TrayRelayCommand(_ => { /* action */ }) },
new TraySeparator(),
new TrayMenuItem { Header = "Exit", Command = new TrayRelayCommand(_ => Environment.Exit(0)) }
};
trayIcon.ShowBalloonTip(3000, "Hello", "This is a balloon tip.", TrayToolTipIcon.Info);
Menu item commands use the ITrayCommand abstraction. For simple actions, use TrayRelayCommand.
You can set the tray icon theme mode:
trayIcon.ThemeMode = TrayThemeMode.Dark;
Demo
- NativeTray.Demo.WPF for WPF applications.
- NativeTray.Demo.WinForms for WinForms applications.
- NativeTray.Demo.Avalonia for Avalonia applications.
- NativeTray.Demo.WinUI for WinUI applications.
- NativeTray.Demo.Maui for MAUI applications.
- NativeTray.Demo.ConsoleApp for Console applications.
License
NativeTray is released under the MIT license. You are free to use and modify it, as long as you comply with the terms of the license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETFramework 4.8.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.