Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FrameworkElement.ToolTip Property

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

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:

public Object ToolTip { get; set; }
/** @property */
public Object get_ToolTip ()

/** @property */
public void set_ToolTip (Object value)

public function get ToolTip () : Object

public function set ToolTip (value : Object)

    <ToolTip .../>
- or -
<object ToolTip="toolTipContent"/>
 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 FrameworkElement . 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

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

Identifier field


Metadata properties set to true


If the value of this property is of type ToolTip, then that value 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 ToolTip.

The following example creates a ToolTip in code and then sets the ToolTip property on a StatusBar control.

private void MakeProgressBar(object sender, RoutedEventArgs e)
  TextBlock txtb = new TextBlock();
  txtb.Text = "Progress of download.";
  ProgressBar progressbar = new ProgressBar();
  Duration duration = new Duration(TimeSpan.FromSeconds(10));
  DoubleAnimation doubleanimation = 
                             new DoubleAnimation(100.0, duration);
  ToolTip ttprogbar = new ToolTip();
  ttprogbar.Content = "Shows the progress of a download.";
  progressbar.ToolTip = (ttprogbar);

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
© 2018 Microsoft