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 control the visibility of the separators in the button panel of WPF Ribbon control?

Platform: WPF |
Control: Ribbon |
Published Date: May 20, 2015 |
Last Revised Date: April 13, 2021

You can change the visibility of the separators in the ButtonPanel by using the SeparatorVisibility property in WPF Ribbon control. The default value of the SeparatorVisibility is Visible. The remaining possible values are Hidden, Visible, and Collapsed.


<Syncfusion:Ribbon Name="ribbon" VerticalAlignment="Top" >
     <Syncfusion:RibbonTab   Caption="Home" IsChecked="False" >
          <Syncfusion:RibbonBar  IsLargeButtonPanel="False" Header="Font" >
               <Syncfusion:ButtonPanel Name="buttonPanel" SeparatorVisibility="Visible">
                    <Syncfusion:RibbonComboBox  IsEditable="True"  Width="110"  />
                    <Syncfusion:RibbonComboBox  IsEditable="True" Width="40" />
               <Syncfusion:ButtonPanel SeparatorVisibility="Collapsed" Height="24">
                    <Syncfusion:RibbonButton  Padding="2" Height="24" Width="24"  SizeForm="ExtraSmall" SmallIcon="/Resources/GrowFont16.png" />
                    <Syncfusion:RibbonButton Padding="2" Height="24" Width="24"   SizeForm="ExtraSmall" SmallIcon="/Resources/ShrinkFont16.png" />
               <Syncfusion:ButtonPanel SeparatorVisibility="Collapsed"  Height="24">
                    <Syncfusion:RibbonButton Padding="2" Height="24" Width="24"  SizeForm="ExtraSmall" SmallIcon="/Resources/ClearFormatting16.png"/>
               <Syncfusion:ButtonPanel SeparatorVisibility="Collapsed" Height="24">
                    <Syncfusion:RibbonButton Padding="2" Height="24" Width="24"  SizeForm="ExtraSmall" IsToggle="True"   SmallIcon="/Resources/Bold16.png"/>
                    <Syncfusion:RibbonButton Padding="2" Height="24" Width="24"  SizeForm="ExtraSmall" IsToggle="True"  SmallIcon="/Resources/Italic16.png"/>
                    <Syncfusion:SplitButton Padding="2" Height="24" Width="37"   SizeForm="ExtraSmall"   SmallIcon="/Resources/Underline16.png"/>
                    <Syncfusion:RibbonButton Padding="2" Height="24" Width="24"  SizeForm="ExtraSmall"   SmallIcon="/Resources/Strikethrough16.png"/>
                    <Syncfusion:RibbonButton Padding="2" Height="24" Width="24"  SizeForm="ExtraSmall"   SmallIcon="/Resources/Subscript16.png"/>
                    <Syncfusion:RibbonButton Padding="2" Height="24" Width="24"  SizeForm="ExtraSmall"   SmallIcon="/Resources/SuperScript16.png"/>
               <Syncfusion:ButtonPanel SeparatorVisibility="Collapsed"  Height="24">
                    <Syncfusion:SplitButton Padding="2" Height="24" Width="37" SizeForm="ExtraSmall" SmallIcon="/Resources/TextHighlightColor16.png"/>
                    <Syncfusion:SplitButton Padding="2" Height="24" Width="37" SizeForm="ExtraSmall" SmallIcon="/Resources/FontColor16.png"/>
     <Syncfusion:RibbonTab   Caption="Insert"/>



buttonPanel.SeparatorVisibility = Visibility.Visible;


The following screenshot displays the Button Panel with Separator Collapsed and Visible.

The button panel with separator collapsed and visible

View sample in GitHub.

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
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
Live Chat Icon