views:

922

answers:

3

Hi,

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

Thanks! For your help. :-)

A: 

Check out the IsOpen property in the ToolTipService class.

Konamiman
The ToolTipService IsOpen is a read only property
Ray
A: 

Is showing a tooltip what you really want to do. A tooltip has a clear meaning to most users and an expectation that it goes away when moving the mouse (and can come back when you hover over the item in question).

If your aim is to draw attention to something, have you considered some form of floating box which is fully under your control, WPF makes this easy!

Ray Hayes
Thanks for the additional thoughts on this. Yes, it's for user-input validation. Can you elaborate a bit on the 'floating box' concept?
Gregg Cleland
Look at http://www.codeproject.com/KB/WPF/WPFBusinessAppsPartTwo.aspx
Ray Hayes
+1  A: 

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;
Ray