Delen via


ToolTipService.SetToolTip(DependencyObject, Object) Method

Definition

Sets the value of the ToolTipService.ToolTip XAML attached property.

public:
 static void SetToolTip(DependencyObject ^ element, Platform::Object ^ value);
 static void SetToolTip(DependencyObject const& element, IInspectable const& value);
public static void SetToolTip(DependencyObject element, object value);
function setToolTip(element, value)
Public Shared Sub SetToolTip (element As DependencyObject, value As Object)

Parameters

element
DependencyObject

The object to set tooltip content on.

value
Object

Platform::Object

IInspectable

The value to set for tooltip content.

Remarks

A ToolTip must be assigned to another UI element that is its owner. In Extensible Application Markup Language (XAML), use the ToolTipService.Tooltip attached property to assign the ToolTip to an owner. In code, use the ToolTipService.SetToolTip method to assign the ToolTip to an owner.

See ToolTipService.ToolTip or ToolTip to learn more about the object content or text that is appropriate to use as tooltip content.

Applies to

See also