ToolTip.Closed Event

Occurs when a ToolTip is closed and is no longer visible.

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

'Declaration
Public Event Closed As RoutedEventHandler
<object Closed="RoutedEventHandler" .../>

Identifier field

ClosedEvent

Routing strategy

Bubbling

Delegate

RoutedEventHandler

The FrameworkElement.ToolTipClosing event is also raised when the ToolTip control is closed.

The following example shows how to set an event handler for the Opened and Closed events.

			AddHandler tooltip.Opened, AddressOf whenToolTipOpens
			AddHandler tooltip.Closed, AddressOf whenToolTipCloses

		Private Sub whenToolTipOpens(ByVal sender As Object, ByVal e As RoutedEventArgs)
			Dim ell As New Ellipse()
			If sender.GetType().FullName.Equals("System.Windows.Shapes.Ellipse") Then
				ell = CType(sender, Ellipse)
				ell.Fill = Brushes.Blue
			ElseIf sender.GetType().FullName.Equals("System.Windows.Controls.ToolTip") Then
				Dim t As ToolTip = CType(sender, ToolTip)
				Dim p As Popup = CType(t.Parent, Popup)
				ell = CType(p.PlacementTarget, Ellipse)
				ell.Fill = Brushes.Blue
			End If
		End Sub

		Private Sub whenToolTipCloses(ByVal sender As Object, ByVal e As RoutedEventArgs)
			Dim ell As New Ellipse()
			If sender.GetType().FullName.Equals("System.Windows.Shapes.Ellipse") Then
				ell = CType(sender, Ellipse)
				ell.Fill = Brushes.Gray
			ElseIf sender.GetType().FullName.Equals("System.Windows.Controls.ToolTip") Then
				Dim t As ToolTip = CType(sender, ToolTip)
				Dim p As Popup = CType(t.Parent, Popup)
				ell = CType(p.PlacementTarget, Ellipse)
				ell.Fill = Brushes.Gray
			End If
		End Sub

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft