Category / Section
How to set the KeyTip for collapsed RibbonBar in WPF Ribbon control?
2 mins read
You can set the KeyTip to collapse the RibbonBar by using the KeyTipOnCollapsed property in WPF Ribbon control. You can access the items in the collapsed RibbonBar with KeyTip by using the keyboard.
XAML
<Syncfusion:Ribbon Name="ribbon" VerticalAlignment="Top"> <Syncfusion:Ribbon.QuickAccessToolBar> <Syncfusion:QuickAccessToolBar Syncfusion:WindowChrome.IsHitTestVisibleInChrome="True"/> </Syncfusion:Ribbon.QuickAccessToolBar> <Syncfusion:RibbonTab Syncfusion:Ribbon.KeyTip="F" Caption="Folder" IsChecked="False" FlowDirection="LeftToRight"> <Syncfusion:RibbonBar KeyTipOnCollapsed="C" Header="Clean Up"> <Syncfusion:RibbonComboBox > <Syncfusion:RibbonComboBoxItem Content="Cleanup Folder"/> <Syncfusion:RibbonComboBoxItem Content="Cleanup Folder and Sub Folders"/> </Syncfusion:RibbonComboBox> <Syncfusion:RibbonButton SizeForm="Small" SmallIcon="/Resources/Delete-All.png" Label="Delete All"/> <Syncfusion:RibbonButton SizeForm="Small" SmallIcon="/Resources/Recover-Deleted Items.png" Label="Recover Deleted Items"/> </Syncfusion:RibbonBar> <Syncfusion:RibbonBar Name="ribbonBar" KeyTipOnCollapsed="P" Header="Properties"> <Syncfusion:RibbonButton SizeForm="Small" SmallIcon="/Resources/Show-in-Favorites.png" Label="Show in Favourites"/> <Syncfusion:RibbonButton SizeForm="Small" SmallIcon="/Resources/Properties.png" Label="Folder Properties"/> <Syncfusion:RibbonButton SizeForm="Small" SmallIcon="/Resources/Archive.png" Label="Auto Archieve Settings"/> </Syncfusion:RibbonBar> </Syncfusion:RibbonTab> <Syncfusion:RibbonTab Syncfusion:Ribbon.KeyTip="S" Caption="Send/Receive" IsChecked="False" FlowDirection="LeftToRight"/> </Syncfusion:Ribbon>
C#
ribbonBar.KeyTipOnCollapsed = "P";
The following screenshot displays the RibbonBar before collapsing.
The following screenshot displays the KeyTip for the collapsed RibbonBar.