NotifyIconEx 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package NotifyIconEx --version 1.1.0                
NuGet\Install-Package NotifyIconEx -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NotifyIconEx" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NotifyIconEx --version 1.1.0                
#r "nuget: NotifyIconEx, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NotifyIconEx as a Cake Addin
#addin nuget:?package=NotifyIconEx&version=1.1.0

// Install NotifyIconEx as a Cake Tool
#tool nuget:?package=NotifyIconEx&version=1.1.0                

NotifyIconEx NuGet Actions Platform

NotifyIconEx is an easy-to-use library for displaying NotifyIcon (notification icon) in WPF / WinForms / Avalonia / WinUI / MAUI / Wice applications, offering non-intrusive system notifications and quick access functionality in the taskbar.

Support dark mode / show icon / checkable / submenus.

You should enable the HiDPI in your Application for better rendering.

Usage

NotifyIconEx is available as NuGet package.

using NotifyIconEx;

var notifyIcon = new NotifyIcon()
{
    Text = "NotifyIcon",
    Icon = Icon.ExtractAssociatedIcon(Process.GetCurrentProcess().MainModule?.FileName!)!
};
notifyIcon.AddMenu("MenuItem1", new Bitmap(ResourceHelper.GetStream("pack://application:,,,/Assets/Images/Lock.png")));
var toDisableItem = notifyIcon.AddMenu("MenuItem2", new Bitmap(ResourceHelper.GetStream("pack://application:,,,/Assets/Images/Lock.png")));
notifyIcon.AddMenu("-");
notifyIcon.AddMenu("MenuItem3");
notifyIcon.AddMenu("MenuItem4", true);
notifyIcon.AddMenu("MenuItem5", OnClick);
notifyIcon.AddMenu("-");
notifyIcon.AddMenu("SubMenu", null!,
[
    new ToolStripMenuItem("SubMenuItem1"),
    new ToolStripMenuItem("SubMenuItem2"),
    new ToolStripMenuItem("SubMenuItem3"),
    new ToolStripMenuItem("SubSubMenu", null!,
    [
        new ToolStripMenuItem("SubSubMenuItem1"),
        new ToolStripMenuItem("SubSubMenuItem2"),
        new ToolStripMenuItem("SubSubMenuItem3")
    ])
]);
notifyIcon.AddMenu("-");
notifyIcon.AddMenu("Exit", (_, _) => Current.Shutdown());
notifyIcon.BalloonTipShown += OnBalloonTipShown;

toDisableItem.Enabled = false;

void OnBalloonTipShown(object? sender, EventArgs e)
{
    Debug.WriteLine("OnBalloonTipShown");
}

void OnClick(object? sender, EventArgs e)
{
    notifyIcon.BalloonTipTitle = "Title";
    notifyIcon.BalloonTipText = "This Balloon Tips";
    notifyIcon.ShowBalloonTip(5);
}

You can set the context menu theme like following:

// NotifyIcon default theme follows the system theme.
// Change it to Dark theme.
NotifyIcon.Theme = NotifyIconTheme.Dark;

Demo

  1. NotifyIcon.Demo.Avalonia for Avalonia Application.

  2. NotifyIcon.Demo.Maui for MAUI Application.

  3. NotifyIcon.Demo.WPF for WPF Application.

  4. NotifyIcon.Demo.Wice for Wice Application.

  5. NotifyIcon.Demo.WinForm for WinForms Application.

  6. NotifyIcon.Demo.WinUI for WinUI Application.

Repository

The source code for NotifyIcon is hosted on GitHub. You can find it at the following URL: https://github.com/lemutec/NotifyIconEx

License

NotifyIconEx is released under the MIT license. This means you are free to use and modify it, as long as you comply with the terms of the license.

Product Compatible and additional computed target framework versions.
.NET net5.0-windows7.0 is compatible.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0-windows was computed.  net8.0-windows7.0 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net5.0-windows7.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.
  • net8.0-windows7.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.

Version Downloads Last updated
1.1.2 228 8/16/2024
1.1.1 127 7/26/2024
1.1.0 78 7/24/2024
1.0.9 98 7/22/2024
1.0.8 91 7/21/2024
1.0.7 115 7/21/2024
1.0.6 97 7/21/2024
1.0.5 110 7/20/2024 1.0.5 is deprecated because it is no longer maintained.
1.0.4 100 7/20/2024 1.0.4 is deprecated because it is no longer maintained.
1.0.3 109 7/20/2024 1.0.3 is deprecated because it is no longer maintained.
1.0.2 108 7/20/2024
1.0.1 84 7/19/2024