Export (0) Print
Expand All

FrameworkElement.ToolTipOpening Event

Occurs when any tooltip on the element is opened.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public event ToolTipEventHandler ToolTipOpening
<object ToolTipOpening="ToolTipEventHandler" .../>

Identifier field

ToolTipOpeningEvent

Routing strategy

Direct

Delegate

ToolTipEventHandler

  • Override OnToolTipClosing to implement class handling for this event in derived classes.

To prevent a tooltip from appearing in the UI, your handler for ToolTipOpening can mark the ToolTipEventArgs event data handled. Otherwise, the tooltip is displayed, using the value of the ToolTip property as the tooltip content. Another possible scenario is that you could write a handler that resets the value of the ToolTip property for the element that is the event source, just before the tooltip is displayed.

ToolTipOpening will not be raised if the value of ToolTip is null or otherwise unset. Do not deliberately set ToolTip to null while a tooltip is open or opening; this will not have the effect of closing the tooltip, and will instead create an undesirable visual artifact in the UI.

The ToolTipOpening event cannot be an EventTrigger in a style. This is because the identifier field of this event re-uses an implementation from a service that does not expose add/remove event methods for the service-level event.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft