Class ToolTipService
Represents a service that provides static methods to display a tooltip.
Inheritance
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public static class ToolTipService
Fields
| Improve this Doc View SourcePlacementProperty
Identifies the ToolTipService.Placement XAML attached property.
Declaration
public static readonly DependencyProperty PlacementProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
PlacementTargetProperty
Identifies the ToolTipService.PlacementTarget XAML attached property.
Declaration
public static readonly DependencyProperty PlacementTargetProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ToolTipProperty
Identifies the ToolTipService.ToolTip XAML attached property.
Declaration
public static readonly DependencyProperty ToolTipProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Methods
| Improve this Doc View SourceGetPlacement(DependencyObject)
Gets the ToolTipService.Placement XAML attached property value for the specified target element.
Declaration
public static PlacementMode GetPlacement(DependencyObject element)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The target element for the attached property value. |
Returns
Type | Description |
---|---|
PlacementMode | The relative position of the specified tooltip. |
GetPlacementTarget(DependencyObject)
Gets the visual element that the tooltip is positioned relative to.
Declaration
public static UIElement GetPlacementTarget(DependencyObject element)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The tooltip to retrieve the visual element of. |
Returns
Type | Description |
---|---|
UIElement | The visual element that the tooltip is positioned relative to. |
GetToolTip(DependencyObject)
Gets the value of the ToolTipService.ToolTip XAML attached property for an object.
Declaration
public static object GetToolTip(DependencyObject element)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The object from which the property value is read. |
Returns
Type | Description |
---|---|
System.Object | The object's tooltip content. |
SetPlacement(DependencyObject, PlacementMode)
Sets the ToolTipService.Placement XAML attached property value for the specified target element.
Declaration
public static void SetPlacement(DependencyObject element, PlacementMode value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The target element for the attached property value. |
PlacementMode | value | One of the PlacementMode values, which specifies where the tooltip should appear relative to the control that is the placement target. |
SetPlacementTarget(DependencyObject, UIElement)
Sets the position of the specified System.Windows.Controls.ToolTipService.ToolTip relative to the specified value element.
Declaration
public static void SetPlacementTarget(DependencyObject element, UIElement value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The tooltip to set the position of. |
UIElement | value | The visual element to set the tooltip for. |
SetToolTip(DependencyObject, Object)
Sets the value of the ToolTipService.ToolTip XAML attached property.
Declaration
public static void SetToolTip(DependencyObject element, object value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | element | The object to set tooltip content on. |
System.Object | value | The value to set for tooltip content. |