Szerkesztés

Megosztás a következőn keresztül:


ToolTipEventHandler Delegate

Definition

Represents the method that will handle routed event that occur when a tooltip opens and closes.

public delegate void ToolTipEventHandler(System::Object ^ sender, ToolTipEventArgs ^ e);
public delegate void ToolTipEventHandler(object sender, ToolTipEventArgs e);
type ToolTipEventHandler = delegate of obj * ToolTipEventArgs -> unit
Public Delegate Sub ToolTipEventHandler(sender As Object, e As ToolTipEventArgs)

Parameters

sender
Object

The object where the event handler is attached.

e
ToolTipEventArgs

The event data.

Remarks

When a tooltip opens and closes, this delegate provides an event handler. The element that specifies the tooltip inherits from either FrameworkElement or FrameworkContentElement. Therefore, open and close events exist on both of these classes. The following table lists the events that use this event handler.

Events that occur when a tooltip opens Events that occur when a tooltip closes
FrameworkElement.ToolTipOpening FrameworkElement.ToolTipClosing
FrameworkContentElement.ToolTipOpening FrameworkContentElement.ToolTipClosing

These events are registered by the ToolTipService class using the ToolTipOpeningEvent and ToolTipClosingEvent fields, but the ToolTipService class does not expose these events on itself (attached or otherwise). The FrameworkElement and FrameworkContentElement classes both implement the ToolTipService and expose this event by defining the events in the previous table, copying the ToolTipService fields to create new routed event identifiers that exist on the FrameworkElement and FrameworkContentElement classes.

If the tooltip is defined as a ToolTip object, the Opened and Closed events of the ToolTip class are also raised when a tooltip opens and closes.

Extension Methods

GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to

See also