Version

Add a Simple ToolTip to a Ribbon Tool

You can use the Microsoft® Windows® Presentation Foundation ToolTip control to display a simple ToolTip for your end users. This type of ToolTip is similar to the ToolTip found on the Save button in Microsoft Word™. However, to keep the ToolTip control’s style consistent with the xamRibbon™ control’s theme, you should set the ToolTip control’s Style property to the static ToolTipStyleKey property exposed by xamRibbon.

xamRibbon Add a Simple ToolTip to a Ribbon Tool 01.png

The following example code demonstrates how to add a simple ToolTip to a xamRibbon tool.

In XAML:

...
<igRibbon:ButtonTool Caption="Save" Name="btnToolSave">
    <igRibbon:ButtonTool.ToolTip>
        <ToolTip
            Content="Save (Ctrl + S)"
            Style="{DynamicResource {x:Static igRibbon:XamRibbon.ToolTipStyleKey}}" />
    </igRibbon:ButtonTool.ToolTip>
</igRibbon:ButtonTool>
...

In Visual Basic:

Imports Infragistics.Windows.Ribbon
...
Dim saveBtnToolTip As New ToolTip With {.Content = "Save (Ctrl + S)"}
saveBtnToolTip.SetResourceReference(StyleProperty, XamRibbon.ToolTipStyleKey)
Me.btnToolSave.ToolTip = saveBtnToolTip
...

In C#:

using Infragistics.Windows.Ribbon;
...
ToolTip saveBtnToolTip = new ToolTip { Content = "Save (Ctrl + S)" };
saveBtnToolTip.SetResourceReference(StyleProperty, XamRibbon.ToolTipStyleKey);
this.btnToolSave.ToolTip = saveBtnToolTip;
...