Lignuz.Wpf.ToolTips 0.0.1

dotnet add package Lignuz.Wpf.ToolTips --version 0.0.1
                    
NuGet\Install-Package Lignuz.Wpf.ToolTips -Version 0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lignuz.Wpf.ToolTips" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lignuz.Wpf.ToolTips" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Lignuz.Wpf.ToolTips" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lignuz.Wpf.ToolTips --version 0.0.1
                    
#r "nuget: Lignuz.Wpf.ToolTips, 0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lignuz.Wpf.ToolTips@0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lignuz.Wpf.ToolTips&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Lignuz.Wpf.ToolTips&version=0.0.1
                    
Install as a Cake Tool

Lignuz.Wpf.ToolTips

A tiny, zero-dependency WPF utility that makes ToolTips behave nicely app-wide:

  • Closes the current ToolTip when the pointer leaves both the host and the tooltip.
  • Re-opens the same ToolTip when the pointer re-enters the host, respecting InitialShowDelay.
  • Works reliably on disabled controls (IsEnabled=false) using coordinate-based hit checks.
  • Prevents flicker with a small grace window right after opening.
  • Global, no per-control setup; just call Initialize() once at startup.

If you ever saw ToolTips sticking around when moving right/down, or refusing to re-open on disabled buttons — this fixes it.

Quick start

App.xaml.cs

using System.Windows;
using System.Windows.Controls;
using Lignuz.Wpf.ToolTips; // <-- namespace

public partial class App : Application
{
    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);

        // (Optional) System-wide defaults
        ToolTipService.InitialShowDelayProperty.OverrideMetadata(
            typeof(FrameworkElement), new FrameworkPropertyMetadata(100));

        // (Optional) Show tooltips on disabled controls on first hover
        // ToolTipService.ShowOnDisabledProperty.OverrideMetadata(
        //     typeof(FrameworkElement), new FrameworkPropertyMetadata(true));

        // Required: enable global manager
        GlobalToolTipManager.Initialize();
    }
}

(Optional) XAML defaults

<Application.Resources>
  <Style TargetType="{x:Type ToolTip}">
    <Setter Property="ToolTipService.InitialShowDelay" Value="100"/>
    <Setter Property="ToolTipService.BetweenShowDelay" Value="0"/>
  </Style>
</Application.Resources>

API

GlobalToolTipManager.Initialize();  // enable global hooks (call once)
GlobalToolTipManager.CloseCurrent(); // force-close the current tooltip

How it works

  • Listens to ToolTip.Opened/Closed to track the actual instance shown by WPF.
  • Watches PreviewMouseMove at the Window scope; considers both the host and its tooltip surface.
  • Uses pointer coordinates (not IsMouseOver) to decide “inside/outside”, which also works when controls are disabled.
  • Applies a short grace period after opening to ignore layout jitter.
  • If a tooltip was closed by the manager and the pointer re-enters the same host, it re-opens the tooltip after the host’s InitialShowDelay.

Target frameworks

  • .NET 8 (Windows, WPF)

No external dependencies.

License

MIT License. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-windows7.0

    • No dependencies.

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
0.0.1 263 9/16/2025