We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set KeyTip in the WPF Ribbon control?

Platform: WPF |
Control: Ribbon |
Published Date: February 18, 2015 |
Last Revised Date: April 13, 2021

The WPF Ribbon Control provides KeyTip support to access the items in ribbon by using keyboard.

The following code example explains how to set the KeyTip for the items present in the Ribbon Control.

XAML

<Syncfusion:Ribbon  Name="ribbon"  VerticalAlignment="Top">
    <Syncfusion:Ribbon.BackStage>
        <Syncfusion:Backstage Syncfusion:Ribbon.KeyTip="B">            <Syncfusion:BackstageTabItem Header="New" Syncfusion:Ribbon.KeyTip="N"/>
            <Syncfusion:BackstageTabItem Header="Print" Syncfusion:Ribbon.KeyTip="P"/>
            <Syncfusion:BackstageTabItem Header="Save As" Syncfusion:Ribbon.KeyTip="H">
                <Syncfusion:ApplicationMenuGroup Header="Save in another format" IconBarEnabled="False">
                    <Syncfusion:SimpleMenuButton Label="Save As" Description="save in your own format"/>
                </Syncfusion:ApplicationMenuGroup>
             </Syncfusion:BackstageTabItem>
             <Syncfusion:BackstageTabItem Header="Discard" Syncfusion:Ribbon.KeyTip="D"/>
              <Syncfusion:BackstageTabItem Header="Delete" Syncfusion:Ribbon.KeyTip="E"/>
              <Syncfusion:BackstageTabItem Header="Share" Syncfusion:Ribbon.KeyTip="S"/>
         </Syncfusion:Backstage>
     </Syncfusion:Ribbon.BackStage>
     <Syncfusion:RibbonTab Name="tab" Caption="Home" Syncfusion:Ribbon.KeyTip="H" >
         <Syncfusion:RibbonBar Header="Clipboard" Syncfusion:Ribbon.KeyTip="M"LauncherClick="OnLauncherClick" >
             <Syncfusion:SplitButton Label="Paste" SizeForm="Large" Syncfusion:Ribbon.KeyTip="V" LargeIcon="/Resources/Paste32.png" />
             <Syncfusion:RibbonButton  Label="Cut" SizeForm="ExtraSmall" Syncfusion:Ribbon.KeyTip="X" SmallIcon="/Resources/Cut16.png"  />
              <Syncfusion:RibbonButton  Label="Copy" SizeForm="ExtraSmall" Syncfusion:Ribbon.KeyTip="C"  SmallIcon="/Resources/Copy16.png"  />
              <Syncfusion:RibbonButton  Label="Format Painter" SizeForm="ExtraSmall" Syncfusion:Ribbon.KeyTip="Y" SmallIcon="/Resources/FormatPainter16.png"   />         </Syncfusion:RibbonBar>
         <Syncfusion:RibbonBar Header="BackStage Operations" LauncherClick="OnLauncherClick" Syncfusion:Ribbon.KeyTip="Z" >
              <Syncfusion:RibbonCheckBox Syncfusion:Ribbon.KeyTip="O" Content="Cancel BackStage Opening" x:Name="BackStageOpeningCheckBox"/>
              <Syncfusion:RibbonComboBox SelectedIndex="0" FlowDirection="LeftToRight" Width="110"  Syncfusion:Ribbon.KeyTip="F"  >
                  <Syncfusion:RibbonComboBoxItem Syncfusion:Ribbon.KeyTip="E">Email_Message</Syncfusion:RibbonComboBoxItem>
                  <Syncfusion:RibbonComboBoxItem Syncfusion:Ribbon.KeyTip="M">Meeting</Syncfusion:RibbonComboBoxItem>
                  <Syncfusion:RibbonComboBoxItem Syncfusion:Ribbon.KeyTip="A">Appointment</Syncfusion:RibbonComboBoxItem>
              </Syncfusion:RibbonComboBox>          </Syncfusion:RibbonBar>     </Syncfusion:RibbonTab>     <Syncfusion:RibbonTab Caption="Insert" Syncfusion:Ribbon.KeyTip="I" >     </Syncfusion:RibbonTab></Syncfusion:Ribbon>

C#

Ribbon.SetKeyTip(tab, "H");

The following screenshot displays the KeyTip.

Display the keytip for ribbon items in WPF Ribbon control

Display the keytip for ribbon backstage items in WPF Ribbon control

 

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile