C1Ribbon ToolTip

Posted by: info on 2 October 2025, 7:49 am EST

    • Post Options:
    • Link

    Posted 2 October 2025, 7:49 am EST - Updated 2 October 2025, 7:56 am EST

    Hello

    <c1:C1ButtonTool Label="Test" ToolTip="aaaaaaaaaa" />

    The specified text does not appear in the tooltip. Only “Test” is shown, while “aaaaaaaaaa” is not displayed.

    How can I customize the tooltip?

    How can I make it behave like Excel’s tooltip?

    C1.WPF.Ribbon 9.0.20251.1133

  • Posted 3 October 2025, 2:06 am EST

    Hi Mikihiro,

    Thanks for reaching out to us.

    Currently, because of how the code is implemented internally, any text you set in the C1ButtonTool’s Label property will override the ToolTip text set in XAML. To use a custom tooltip, we recommend setting it in the code-behind instead, like this:

    private void C1Ribbon_Loaded(object sender, RoutedEventArgs e)
    {
        ToolTipService.SetToolTip(cutBtn, "This is cut button custom tooltip");
        ToolTipService.SetToolTip(pasteBtn, "This is paste button custom tooltip");
    }
    

    We have also attached a code snippet for implementation. See ButtonToolTip.zip.

    Thanks & regards,

    Aastha

  • Posted 3 October 2025, 10:49 am EST - Updated 3 October 2025, 10:54 am EST

    Thank you for your reply.

    When additional RibbonTabItems are added, the ToolTip settings do not work for tabs other than the one specified by SelectedIndex.

    <c1:C1Ribbon
        FontSize="14"
        Loaded="C1Ribbon_Loaded"
        SelectedIndex="0">
        <c1:RibbonTabItem Header="Home">
            <c1:RibbonGroup Header="Edit">
                <c1:C1ButtonTool Name="cutBtn" Label="Cut" />
            </c1:RibbonGroup>
        </c1:RibbonTabItem>
        <c1:RibbonTabItem Header="SecondTab">
            <c1:RibbonGroup Header="Edit">
                <c1:C1ButtonTool Name="pasteBtn" Label="Paste" />
            </c1:RibbonGroup>
        </c1:RibbonTabItem>
    </c1:C1Ribbon>

  • Posted 6 October 2025, 3:16 am EST

    Hi Mikihiro,

    Thank you for bringing this to our attention.

    This behavior occurs because the content of the SecondTab isn’t loaded at the time the tooltip is being set for pasteBtn. To resolve this, we recommend setting the tooltip after the corresponding RibbonGroup has been loaded.

    Here’s the updated code snippet:

    private void rg1_Loaded(object sender, RoutedEventArgs e)
    {
        ToolTipService.SetToolTip(cutBtn, "This is cut button custom tooltip");
    }
    private void rg2_Loaded(object sender, RoutedEventArgs e)
    {
        ToolTipService.SetToolTip(pasteBtn, "This is paste button custom tooltip");
    }

    We’ve attached an updated sample demonstrating this implementation. [ButtonToolTip_Mod.zip]

    Thanks & regards,

    Aastha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels