How to Programmatically show a WPF/C# Windows.Control.ToolTip?

MrGreggles picture MrGreggles · Oct 1, 2009 · Viewed 31.6k times · Source

There doesn't seem to be a .Show() kind of method for the Windows.Control.ToolTip, incl in ToolTipService.

Answer

Ray picture Ray · Dec 16, 2009

What you need to do is make sure the ToolTip on the control is of type ToolTip. Then you can set the IsOpen property to true like so:

ToolTip tooltip = new ToolTip{ Content = "My Tooltip" };
NameTextBox.ToolTip = tooltip;
tooltip.IsOpen = true;