Alturis
Alturis

Reputation: 74

WPF Taking control of tooltip popups

I am working on a simple text editor that allows the user to hover over words in the text and get information about them. I am looking for a way to control a tooltip that pops up based on my own logic the drives from the MouseMove event. Trying to create a simple popup that acts similar to a code editing window when you are debugging and looking at variable symbol values by hovering the mouse over words in the text.

I am not seeing an obvious way to force the tooltip to show/hide on-demand.

Upvotes: 0

Views: 64

Answers (1)

mm8
mm8

Reputation: 169150

Instead of using the ToolTip property, you could use a Popup element and set its IsOpen property to control when you want to display it.

You can style it to look like a ToolTip.

Upvotes: 1

Related Questions