PicaPico.NotifyIcon
1.0.0
dotnet add package PicaPico.NotifyIcon --version 1.0.0
NuGet\Install-Package PicaPico.NotifyIcon -Version 1.0.0
<PackageReference Include="PicaPico.NotifyIcon" Version="1.0.0" />
paket add PicaPico.NotifyIcon --version 1.0.0
#r "nuget: PicaPico.NotifyIcon, 1.0.0"
// Install PicaPico.NotifyIcon as a Cake Addin #addin nuget:?package=PicaPico.NotifyIcon&version=1.0.0 // Install PicaPico.NotifyIcon as a Cake Tool #tool nuget:?package=PicaPico.NotifyIcon&version=1.0.0
NotifyIcon
NotifyIcon is an easy-to-use library for displaying NotifyIcon (notification icon) in both WPF and WinForms applications, offering non-intrusive system notifications and quick access functionality in the taskbar.
Usage
NotifyIcon is available as NuGet package.
using PicaPico;
string GetExePath()
{
Process currentProcess = Process.GetCurrentProcess();
return currentProcess.MainModule?.FileName ?? string.Empty;
}
var notifyIcon = new NotifyIcon()
{
Text = "NotifyIcon",
Icon = System.Drawing.Icon.ExtractAssociatedIcon(GetExePath())
};
var menuFirst = notifyIcon.AddMenu("MenuItem1");
menuFirst.Margin = new System.Windows.Forms.Padding(0, 2, 0, 0);
notifyIcon.AddMenu("MenuItem2", true);
notifyIcon.AddMenu("MenuItem3", onClick);
var menuLast = notifyIcon.AddMenu("Exit", (sender, e) => { Current.Shutdown(); });
menuLast.Margin = new System.Windows.Forms.Padding(0, 0, 0, 2);
notifyIcon.BalloonTipShown += OnBalloonTipShown;
void OnBalloonTipShown(object? sender, EventArgs e)
{
MessageBox.Show("OnBalloonTipShown");
}
void onClick(object? sender, EventArgs e)
{
notifyIcon.BalloonTipTitle = "Title";
notifyIcon.BalloonTipText = "This Balloon Tips";
notifyIcon.ShowBalloonTip(5);
}
Repository
The source code for NotifyIcon is hosted on GitHub. You can find it at the following URL: https://github.com/HeHang0/NotifyIcon
License
NotifyIcon 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net7.0-windows7.0 is compatible. net8.0-windows was computed. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 was computed. |
-
.NETFramework 4.6.2
- Microsoft-WindowsAPICodePack-Shell-6.0 (>= 1.1.5)
- PicaPico.ThemeListener (>= 1.0.0)
-
.NETFramework 4.7.2
- Microsoft-WindowsAPICodePack-Shell-6.0 (>= 1.1.5)
- PicaPico.ThemeListener (>= 1.0.0)
-
.NETFramework 4.8
- Microsoft-WindowsAPICodePack-Shell-6.0 (>= 1.1.5)
- PicaPico.ThemeListener (>= 1.0.0)
-
net6.0-windows7.0
- Microsoft-WindowsAPICodePack-Shell-6.0 (>= 1.1.5)
- PicaPico.ThemeListener (>= 1.0.0)
-
net7.0-windows7.0
- Microsoft-WindowsAPICodePack-Shell-6.0 (>= 1.1.5)
- PicaPico.ThemeListener (>= 1.0.0)
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.0.0 | 224 | 7/22/2023 |
First release