Open yoyos opened 2 years ago
Hello. Thanks for the problem. What version of Windows are you using? I checked on Windows 11, the ToolTip is showing:
Edition Windows 10 Pro Version 21H2 Installed on 12/01/22 OS build 19044.1645 Experience Windows Feature Experience Pack 120.2212.4170.0
Hello. Thanks for the problem. What version of Windows are you using? I checked on Windows 11, the ToolTip is showing:
Hi, on my side the custom tooltip (wpf .net5.0) not showing on Windows 11. But it can be shown on Windows 10.
Apologies if I've got this wrong but the OP appears to be using the TrayIcon, which does not have a handler for the tooltip by default (TrayIcon.MessageWindow.BalloonToolTipChanged).
I think the sample projects may be a little confusing - the H.NotifyIcon.Apps.Wpf.Windowless
sample project uses the TaskbarIcon instead of the TrayIcon (and the tooltip works because of the event handler), whilst the H.NotifyIcon.Apps.Console
sample project uses TrayIcon that does not include an event handler. Although the console sample includes a tooltip
using var trayIcon = new TrayIconWithContextMenu
{
Icon = icon.Handle,
ToolTip = "ToolTip",
};
the console example doesn't have the required code to actually display the said tooltip.
I ran into the same issue as OP so I'm new to understanding this library, is this correct @HavenDV? How does one reference TaskbarIcon from a console project? Although TaskbarIcon has HAS_WPF checks I don't know if it's simple or requires threading more suited to WPF apps.
Apologies if I've got this wrong but the OP appears to be using the TrayIcon, which does not have a handler for the tooltip by default (TrayIcon.MessageWindow.BalloonToolTipChanged).
I think the sample projects may be a little confusing - the
H.NotifyIcon.Apps.Wpf.Windowless
sample project uses the TaskbarIcon instead of the TrayIcon (and the tooltip works because of the event handler), whilst theH.NotifyIcon.Apps.Console
sample project uses TrayIcon that does not include an event handler. Although the console sample includes a tooltipusing var trayIcon = new TrayIconWithContextMenu { Icon = icon.Handle, ToolTip = "ToolTip", };
the console example doesn't have the required code to actually display the said tooltip.
I ran into the same issue as OP so I'm new to understanding this library, is this correct @HavenDV? How does one reference TaskbarIcon from a console project? Although TaskbarIcon has HAS_WPF checks I don't know if it's simple or requires threading more suited to WPF apps.
There are two packages here:
H.NotifyIcon - Which contains the TrayIcon
/TrayIconWithContextMenu
classes that are available for use from the console project
H.NotifyIcon.Wpf - Contains a TaskbarIcon
that is commonly used via xaml. This is a TrayIcon
wrapper that allows you to take advantage of WPF.
So far I've tested the console classes on Windows 11 and the tooltip worked correctly. Since this is just a wrapper over the Win32 api, I don't have any ideas yet why this might not work on Windows 10. If there are any additional details, I'd love to hear them.
Could this be related to Windows 11's new XAML-based system tray?
This is the old GDI system tray:
This is the new XAML system tray, which has drop shadows, rounded corners, and nicer transition animation:
My friend's computer is running Windows 11 stable build, which has the old GDI system tray. On his PC H.NotifyIcon
's tooltips work fine.
I have 2 computers, both running Windows 11 Insider Release Preview. I remember that tooltip in console program used to work on both computers, but both stopped working at some point, maybe after Microsoft pushed the new XAML system tray to these 2 computers.
However, it seems that only programs using H.NotifyIcon
are affected. The tooltips of all the other programs with system tray icons (Steam, OneDrive, Everything, etc.) on my PC work fine. Maybe there's something special in your implementation?
Describe the bug
Maybe I missed something but I created a simple TrayIcon with a tooltip+icon Icon is showing correctly but no tooltip appears when moving the mouse over the icon.
Steps to reproduce the bug
Expected behavior
"ToolTip Info" should be displayed on mouse over
Screenshots
No response
NuGet package version
H.NotifyIcon 2.0.50
Platform
Console
IDE
Visual Studio 2022
Additional context
Using .NET 6 and console application.