Articles in this section

How to collapse the RibbonBar panel in WPF Ribbon control?

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)
Access denied
Access denied