C# – Forcing a WPF tooltip to stay on the screen


I have a tooltip for a Label and I want it to stay open until the user
moves the mouse to a different control.

I have tried the following properties on the tooltip:



ToolTipService.ShowDuration = "60000"

But in both cases the tooltip is only displayed for exactly 5 seconds.

Why are these values being ignored?

Best Solution

If you want to set this for just one tooltip, set the duration on the object having the Tooltip, like this:

<Label ToolTipService.ShowDuration="12000" Name="lblShowTooltip" Content="Shows tooltip">
            <TextBlock>Hello world!</TextBlock>

I'd say that this design was chosen because it allows same tooltip with different timeouts on different controls.

If you want this globally for your whole app, see the accepted answer.