[WinUI3] ToolTipText doesn't work on Windows 11
Describe the bug
<UserControl x:Class="xxx" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MultiMiracast" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:tb="using:H.NotifyIcon" mc:Ignorable="d">
<tb:TaskbarIcon
x:Name="TrayIcon"
ToolTipText="Test-ToolTip"
NoLeftClickDelay="True"
IconSource="/Assets/ShareHub.ico"
/>
Steps to reproduce the bug
No response
Expected behavior
mouse hover can display the tooltip
Screenshots
No response
NuGet package version
NotifyIcon.WinUI:2.0.108 Mircosoft.WindowsAppSDK:1.3.230502000 Miraosoft.Windows.SDK.BuildTools:10.0.22621.756
x64 net6.0-windows10.0.22621.0
Windows 11 build 22621.1702
Platform
WinUI
IDE
Visual Studio 2022
Windows Version
Windows 11
WindowsAppSDK Version
Other
WindowsAppSDK Type
Packaged
Manifest
Additional context
No response
I think it is the same issue as this one
I think it is the same issue as this one
<UserControl.Resources>
<XamlUICommand
x:Key="ShowHideWindowCommand"
ExecuteRequested="ShowHideWindowCommand_ExecuteRequested"
Label="Configuration" />
<XamlUICommand
x:Key="ExitApplicationCommand"
ExecuteRequested="ExitApplicationCommand_ExecuteRequested"
Label="Exit" />
<MenuFlyout
x:Key="TrayContextFlyout"
AreOpenCloseAnimationsEnabled="False">
<MenuFlyoutItem Command="{StaticResource ShowHideWindowCommand}" />
<MenuFlyoutSeparator />
<MenuFlyoutItem Command="{StaticResource ExitApplicationCommand}" />
</MenuFlyout>
<ToolTip x:Key="CustomToolTip">
<StackPanel>
<TextBlock Text="CustomToolTip" HorizontalAlignment="Center" />
</StackPanel>
</ToolTip>
</UserControl.Resources>
<tb:TaskbarIcon
x:Name="TrayIcon"
ToolTipText="Test-ToolTip"
TrayToolTip="{StaticResource CustomToolTip}"
ContextFlyout="{StaticResource TrayContextFlyout}"
ContextMenuMode="PopupMenu"
NoLeftClickDelay="True"
IconSource="/Assets/Logo.ico">
</tb:TaskbarIcon>
not fix this issue
Same here, the tooltips doesn't work at all. I can see the new native tooltips showing without a text appear sometime. I think since windows 11 22h2 already have a new native fluent tooltips, it should use that instead.
Looks like v116 (or v115 ?) has fixed this bug.
Looks like v116 (or v115 ?) has fixed this bug.
Or another Windows update that fixed what was broken in the previous update
Did some testing. On Windows 11 22621.2134:
- Version ≤ 112 doesn't work
- Version ≥ 113 works
Thanks for checking, then it's related to this commit - https://github.com/HavenDV/H.NotifyIcon/commit/e12eac8d90df1796e076d092504b63dc29a35231
The WPF version (code inherited from hardcodet/wpf-notifyicon) used custom tooltips by default. Now the system ones will be used by default
Awesome! Now the tooltips are appearing
Is this currently fixed? I'm on Windows 11 (10.0.22631.3447) and .NET 8, but the WPF version does not show custom tooltips. Only the pure text version (ToolTipText) is shown. Even the showcase examples do not show custom tooltips on my machine.