ClassRadToolTipService
The RadToolTipService class provides a comprehensive service for managing tooltips in a WPF application. It enables the user to customize tooltip behavior through various properties and events, such as show and hide delays, position offsets, and tooltip content. This service supports the attachment of events for tooltip opening and closing, and facilitates dynamic updates to tooltips as the user interacts with UI elements. Furthermore, it manages the display of tooltips based on user actions (like mouse movement) and conditions, allowing for an enhanced user experience through rich tooltip customization.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
public static class RadToolTipService
Inheritance: objectRadToolTipService
Fields
BetweenShowDelayProperty
Identifies the BetweenShowDelay dependency property.
Declaration
public static readonly DependencyProperty BetweenShowDelayProperty
Field Value
DependencyProperty
HorizontalOffsetProperty
Identifies the HorizontalOffset dependency property.
Declaration
public static readonly DependencyProperty HorizontalOffsetProperty
Field Value
DependencyProperty
InitialShowDelayProperty
Identifies the InitialShowDelay dependency property.
Declaration
public static readonly DependencyProperty InitialShowDelayProperty
Field Value
DependencyProperty
IsEnabledProperty
Identifies the IsEnabled dependency property.
Declaration
public static readonly DependencyProperty IsEnabledProperty
Field Value
DependencyProperty
IsOpenProperty
Identifies the IsOpen dependency property.
Declaration
public static readonly DependencyProperty IsOpenProperty
Field Value
DependencyProperty
PlacementProperty
Identifies the Placement dependency property.
Declaration
public static readonly DependencyProperty PlacementProperty
Field Value
DependencyProperty
PlacementRectangleProperty
Identifies the PlacementRectangle dependency property.
Declaration
public static readonly DependencyProperty PlacementRectangleProperty
Field Value
DependencyProperty
PlacementTargetProperty
Identifies the PlacementTarget dependency property.
Declaration
public static readonly DependencyProperty PlacementTargetProperty
Field Value
DependencyProperty
ShowDurationProperty
Identifies the ShowDuration dependency property.
Declaration
public static readonly DependencyProperty ShowDurationProperty
Field Value
DependencyProperty
ToolTipClosingEvent
Identifies the ToolTipClosing routed event.
Declaration
public static readonly RoutedEvent ToolTipClosingEvent
Field Value
RoutedEvent
ToolTipContentProperty
Identifies the ToolTipContent dependency property.
Declaration
public static readonly DependencyProperty ToolTipContentProperty
Field Value
DependencyProperty
ToolTipContentTemplateProperty
Identifies the ToolTipContentTemplate dependency property.
Declaration
public static readonly DependencyProperty ToolTipContentTemplateProperty
Field Value
DependencyProperty
ToolTipOpeningEvent
Identifies the ToolTipOpening routed event.
Declaration
public static readonly RoutedEvent ToolTipOpeningEvent
Field Value
RoutedEvent
VerticalOffsetProperty
Identifies the VerticalOffset dependency property.
Declaration
public static readonly DependencyProperty VerticalOffsetProperty
Field Value
DependencyProperty
Methods
AddToolTipClosingHandler(DependencyObject, RoutedEventHandler)
Adds handler for the ToolTipClosing event.
Declaration
public static void AddToolTipClosingHandler(DependencyObject target, RoutedEventHandler handler)
Parameters
target
DependencyObject
The target.
handler
RoutedEventHandler
The handler.
AddToolTipOpeningHandler(DependencyObject, RoutedEventHandler)
Adds handler for the ToolTipOpening event.
Declaration
public static void AddToolTipOpeningHandler(DependencyObject target, RoutedEventHandler handler)
Parameters
target
DependencyObject
The target.
handler
RoutedEventHandler
The handler.
GetBetweenShowDelay(DependencyObject)
Gets the maximum time between the display of two tooltips where the second tooltip appears without a delay.
Declaration
public static int GetBetweenShowDelay(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
GetHorizontalOffset(DependencyObject)
Gets the offset from the left of the area that is specified for the tooltip by the PlacementRectangle and PlacementTarget properties.
Declaration
public static double GetHorizontalOffset(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
GetInitialShowDelay(DependencyObject)
Gets the length of time before a tooltip opens.
Declaration
public static int GetInitialShowDelay(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
GetIsEnabled(DependencyObject)
Gets whether a tooltip appears.
Declaration
public static bool GetIsEnabled(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
GetIsOpen(DependencyObject)
Gets whether a tooltip is currently visible.
Declaration
public static bool GetIsOpen(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
GetPlacement(DependencyObject)
Gets the orientation of the tooltip when it opens, and specifies how the tooltip behaves when it overlaps screen boundaries.
Declaration
public static PlacementMode GetPlacement(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
PlacementMode
GetPlacementRectangle(DependencyObject)
Gets the rectangular area relative to which the tooltip is positioned.
Declaration
public static Rect GetPlacementRectangle(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
Rect
GetPlacementTarget(DependencyObject)
Gets the object relative to which the tooltip is positioned.
Declaration
public static UIElement GetPlacementTarget(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
UIElement
GetShowDuration(DependencyObject)
Gets the amount of time that a tooltip remains visible.
Declaration
public static int GetShowDuration(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
GetToolTipContent(DependencyObject)
Gets the content of the ToolTip.
Declaration
public static object GetToolTipContent(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
GetToolTipContentTemplate(DependencyObject)
Gets the ToolTip content template.
Declaration
public static DataTemplate GetToolTipContentTemplate(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
DataTemplate
GetVerticalOffset(DependencyObject)
Gets the distance from the top of the area that is specified for the tooltip by the PlacementRectangle and PlacementTarget properties.
Declaration
public static double GetVerticalOffset(DependencyObject element)
Parameters
element
DependencyObject
The element.
Returns
HideTooltip(FrameworkElement)
Hides the tooltip.
Declaration
public static void HideTooltip(FrameworkElement owner)
Parameters
owner
FrameworkElement
The owner of the tooltip.
RemoveToolTipClosingHandler(DependencyObject, RoutedEventHandler)
Removes handler for the ToolTipClosing event.
Declaration
public static void RemoveToolTipClosingHandler(DependencyObject target, RoutedEventHandler handler)
Parameters
target
DependencyObject
The target.
handler
RoutedEventHandler
The handler.
RemoveToolTipOpeningHandler(DependencyObject, RoutedEventHandler)
Removes handler for the ToolTipOpening event.
Declaration
public static void RemoveToolTipOpeningHandler(DependencyObject target, RoutedEventHandler handler)
Parameters
target
DependencyObject
The target.
handler
RoutedEventHandler
The handler.
SetBetweenShowDelay(DependencyObject, int)
Sets the maximum time between the display of two tooltips where the second tooltip appears without a delay.
Declaration
public static void SetBetweenShowDelay(DependencyObject element, int value)
Parameters
element
DependencyObject
The element.
value
The value.
SetHorizontalOffset(DependencyObject, double)
Sets the offset from the left of the area that is specified for the tooltip by the PlacementRectangle and PlacementTarget properties.
Declaration
public static void SetHorizontalOffset(DependencyObject element, double value)
Parameters
element
DependencyObject
The element.
value
The value.
SetInitialShowDelay(DependencyObject, int)
Sets the length of time before a tooltip opens.
Declaration
public static void SetInitialShowDelay(DependencyObject element, int value)
Parameters
element
DependencyObject
The element.
value
The value.
SetIsEnabled(DependencyObject, bool)
Sets whether a tooltip appears.
Declaration
public static void SetIsEnabled(DependencyObject element, bool value)
Parameters
element
DependencyObject
The element.
value
The value.
SetPlacement(DependencyObject, PlacementMode)
Sets the orientation of the tooltip when it opens, and specifies how the tooltip behaves when it overlaps screen boundaries.
Declaration
public static void SetPlacement(DependencyObject element, PlacementMode value)
Parameters
element
DependencyObject
The element.
value
PlacementMode
The value.
SetPlacementRectangle(DependencyObject, Rect)
Sets the rectangular area relative to which the tooltip is positioned.
Declaration
public static void SetPlacementRectangle(DependencyObject element, Rect value)
Parameters
element
DependencyObject
The element.
value
Rect
The value.
SetPlacementTarget(DependencyObject, UIElement)
Sets the object relative to which the tooltip is positioned.
Declaration
public static void SetPlacementTarget(DependencyObject element, UIElement value)
Parameters
element
DependencyObject
The element.
value
UIElement
The value.
SetShowDuration(DependencyObject, int)
Sets the amount of time that a tooltip remains visible.
Declaration
public static void SetShowDuration(DependencyObject element, int value)
Parameters
element
DependencyObject
The element.
value
The value.
SetToolTipContent(DependencyObject, object)
Sets the content of the ToolTip.
Declaration
public static void SetToolTipContent(DependencyObject element, object value)
Parameters
element
DependencyObject
The element.
value
The value.
SetToolTipContentTemplate(DependencyObject, DataTemplate)
Sets the ToolTip content template.
Declaration
public static void SetToolTipContentTemplate(DependencyObject element, DataTemplate value)
Parameters
element
DependencyObject
The element.
value
DataTemplate
The value.
SetVerticalOffset(DependencyObject, double)
Sets the distance from the top of the area that is specified for the tooltip by the PlacementRectangle and PlacementTarget properties.
Declaration
public static void SetVerticalOffset(DependencyObject element, double value)
Parameters
element
DependencyObject
The element.
value
The value.