Articles in this section
Category / Section

How to collapse the RibbonBar panel in WPF Ribbon control?

1 min read

Using reflection, you can access and modify the PanelState property to hide the panel of RibbonBar in WPF Ribbon control

C#

Type ribbonBarType = typeof(RibbonBar);

 

PropertyInfo panelStateProperty = ribbonBarType.GetProperty("PanelState", BindingFlags.Public |BindingFlags.Instance);

panelStateProperty.SetValue(ribbonBar, RibbonBarState.Collapsed, null);

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied