H.NotifyIcon.Wpf 2.0.17

H.NotifyIcon - NotifyIcon for .Net Core 3.1/.Net 5/.Net 6 WPF and WinUI

** This is a fork, if you see any activity in the official version - it's better to use them - https://github.com/hardcodet/wpf-notifyicon **

Language License Build Status

This is an implementation of a NotifyIcon (aka system tray icon or taskbar icon) for the WPF/WinUI platform. It does not just rely on the Windows Forms NotifyIcon component, but is a purely independent control which leverages several features of the WPF/WinUI framework in order to display rich tooltips, popups, context menus, and balloon messages. It can be used directly in code or embedded in any XAML file.

Nuget

Nuget Nuget

Install-Package H.NotifyIcon.Wpf
Install-Package H.NotifyIcon.WinUI

Usage

<Window
  x:Class="Hardcodet.NetDrives.UI.SystemTray.Sample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:tb="http://www.hardcodet.net/taskbar" // WPF
  xmlns:tb="using:H.NotifyIcon" // WinUI
  >

    <tb:TaskbarIcon x:Name="myNotifyIcon"
                    Visibility="Visible"
                    ToolTipText="Fallback ToolTip for Windows xp"
                    IconSource="/Images/TrayIcons/Logo.ico"
                    ContextMenu="{StaticResource TrayMenu}"
                    MenuActivation="LeftOrRightClick"
                    TrayPopup="{StaticResoure TrayStatusPopup}"
                    PopupActivation="DoubleClick"
                    TrayToolTip="{StaticResource TrayToolTip}"
      />

</Window>

Features

  • Custom Popups (interactive controls) on mouse clicks.
  • Customized ToolTips (Vista and above) with fallback mechanism for xp/2003.
  • Rich event model including attached events to trigger animations in Popups, ToolTips, and balloon messages. I just love that.
  • Full support for standard Windows balloons, including custom icons.
  • Custom balloons that pop up in the tray area. Go wild with styles and animations 🙂
  • Support for WPF context menus.
  • You can define whether to show Popups on left-, right-, double-clicks etc. The same goes for context menus.
  • Simple data binding for Popups, ToolTips and custom balloons through attached properties and derived data context.
  • Command support for single / double clicks on the tray icon.

Sample Apps

No packages depend on H.NotifyIcon.Wpf.

⭐ Last 10 features: - feat(WinUI): Added support for simple context menu. 2022-04-02 - feat: Added exceptions to TrayIcon. 2022-04-02 - feat: Added Nullable enable to H.NotifyIcon project. 2022-04-01 - feat: To static messages. 2022-04-01 - feat: Added TrayIcon.SetFocus(). 2022-04-01 - feat: Added new Notification API. 2022-04-01 - feat: Added ability to create multiple TrayIcon. 2022-04-01 - feat: Added return bool values to TrayIcon methods. 2022-04-01 - feat: Added Uno and Uno.WinUI support for Skia.Wpf platform. 2022-04-01 - feat: To CsWin32 Shell32 code. Added x86 support. 2022-04-01 🐞 Last 10 bug fixes: - fix: Fixed CI. 2022-04-02 - fix: Fixed CI build. 2022-04-02 - fix: Fixed CI build 2. 2022-04-02 - fix: Fixed CI build. 2022-04-02 - fix: Removed unused TrayIcon.HideBalloonTip. 2022-04-01 - fix: Fixed SupportedOSPlatform for TrayIcon. 2022-04-01 - fix: Fixed PInvoke error checking. 2022-04-01 - fix(WinUI): Fixed icon loading. 2022-02-25 - fix(WinUI): Fixed DoSingleClickAction. 2022-02-25 - fix(WinUI): Fixed DoubleClickCommand. 2022-02-25

.NET Framework 4.5.1

.NET Core 3.1

.NET 5.0

.NET 6.0

Version Downloads Last updated
2.0.17 13 4/14/2023