FrameworkContentElement.ToolTip Property

Definition

Gets or sets the tool-tip object that is displayed for this element in the user interface (UI).

public:
 property System::Object ^ ToolTip { System::Object ^ get(); void set(System::Object ^ value); };
[System.ComponentModel.Bindable(true)]
public object ToolTip { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.ToolTip : obj with get, set
Public Property ToolTip As Object

Property Value

The tooltip object.

Attributes

Examples

The following example sets the value of the ToolTip property directly to a string.

// Alias the working TableRowGroup for ease in referencing.
TableRowGroup trg = tbl.RowGroups[0];
trg.Rows[0].Background = Brushes.CornflowerBlue;
trg.Rows[1].FontSize = 24;
trg.Rows[2].ToolTip = "This row's tooltip";
' Alias the working TableRowGroup for ease in referencing.
Dim trg As TableRowGroup = tbl.RowGroups(0)
trg.Rows(0).Background = Brushes.CornflowerBlue
trg.Rows(1).FontSize = 24
trg.Rows(2).ToolTip = "This row's tooltip"

Remarks

If the value of this property is of type ToolTip, then that is the tool-tip that will be used in the UI. If the value is of any other type, then that value will be used as the content for a ToolTip provided (constructed) by the system. For more information see ToolTipService. The service class provides attached properties that can be used to further customize a tool-tip.

XAML Attribute Usage

<object ToolTip="toolTipContent"/>

XAML Property Element Usage

<object>
  <object.ToolTip>
    <ToolTip .../>
  </object.ToolTip>
</object>

-or-

<object>
  <object.ToolTip>
    toolTipObjectContent
  </object.ToolTip>
</object>

XAML Values

toolTipContent A string that becomes the display text for the ToolTip.

toolTipObjectContent Some object, provided in object element form, that should be used as the content for the FrameworkContentElement. Typically this would be a FrameworkElement or some other element that creates layout compositing for the ToolTip, eventually containing text content within the compositing. In this usage, the ToolTip element is created implicitly from the parsed XAML, and the toolTipObjectContent content is set as its ContentControl.Content property.

<ToolTip .../> See ToolTip.

Dependency Property Information

Identifier field ToolTipProperty
Metadata properties set to true None

Applies to