A cross-platform C# library to display a notification icon in the taskbar notification area ("tray").
$ dotnet add package NotificationIcon.NETA cross-platform C# library to display a notification icon in the taskbar notification area ("tray"). Lightweight package with no dependencies.
Features


using NotificationIcon.NET;
string iconImagePath = @"/path/to/icon.png"; //For Windows, use the ".ico" file format. Otherwise, use ".png". Absolute path recommended.
NotifyIcon icon = NotifyIcon.Create(iconImagePath, new List<MenuItem>() {
new MenuItem("Example Button"),
new MenuItem("Example Checkbox")
{
IsChecked = true,
Click = (s, e) =>
{
MenuItem me = (MenuItem)s!;
me.IsChecked = !me.IsChecked;
}
}
});
icon.Show(); //Use icon.Dispose() to hide
Note: this is not required to use the library.
dotnet build --configuration Releaseprebuilt/.