Skip to main content

Class ToolTipManipulator

A custom manipulator that displays a tooltip when the mouse hovers over the target element.

public class ToolTipManipulator : Manipulator

Inheritance​

Examples​

var button = new Button { text = "Hover me", tooltip = "This is a tooltip" };
button.AddManipulator(new ToolTipManipulator(rootVisualElement));

Remarks​

The tooltip appears relative to the target and uses the target's tooltip property as its content.

Constructors​

ToolTipManipulator()​

Default constructor. You must set the root visual element manually for the tooltip to display.

public ToolTipManipulator()

ToolTipManipulator(VisualElement)​

Initializes a new instance of the ToolTipManipulator class with a reference to the root visual element.

public ToolTipManipulator(VisualElement parent)

Parameters​

NameTypeDescription
parentVisualElementThe root visual element where the tooltip will be added.

Methods​

RegisterCallbacksOnTarget()​

Called to register event callbacks on the target element.

Registers mouse enter and exit callbacks on the target element.

protected override void RegisterCallbacksOnTarget()

UnregisterCallbacksFromTarget()​

Called to unregister event callbacks from the target element.

Unregisters mouse enter and exit callbacks from the target element.

protected override void UnregisterCallbacksFromTarget()