Export (0) Print
Expand All

FrameworkContentElement.ToolTip Property

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

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

[BindableAttribute(true)]
public Object ToolTip { get; set; }
<object>
  <object.ToolTip>
    <ToolTip .../>
  </object.ToolTip>
</object>
- or -
<object>
  <object.ToolTip>
    toolTipObjectContent
  </object.ToolTip>
</object>
<object ToolTip="toolTipContent"/>

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.

Property Value

Type: System.Object
The tooltip object. See Remarks below for details on why this parameter is not strongly typed.

Identifier field

ToolTipProperty

Metadata properties set to true

None

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.

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";

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft