Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
How to Force RibbonGroup to collapse unconditionally
posted

Hi,
I would like to force the default state of specific RibbonGroups in a Ribbon Tab  to be always "collapsed"  (i.e. the group's DropDownButtonUIElement is in view rather than the underlying content - which is only shown when clicked.)
This behaviour is seen naturally when you manually reduce the width of the parent form to such a point that the group's content would otherwise be clipped - at which point it shows a button instead - with a down arrow).
I want to acheive this same effect but to have it in this state regardless of the width of the parent form.

i.e. something like

OnRibbonInitialize()
{
 this.MyToolbarsManager.Ribbon.Tabs["MyTab"].Groups["GroupToCollapse"].IsCollapsed = true;
}

where IsCollapsed is the functionality I am looking for  - it doesn't exist.

Thanks