Skip to main content

Hide ribbon groups

The following code can hide the groups contained in the RibbonBar.

public void formRibbonGroupVisibilty(bool visible,string groupName)

{

RibbonGroup formGroup = RibbonBar.FindGroup(groupName);

if (formGroup != null)

{

formGroup.Visible = visible;

}

}

protected override void OnLoad(EventArgs e)

{

Base. OnLoad(e);

formRibbonGroupVisibilty(false,"Share");

formRibbonGroupVisibilty(false,"Open");

formRibbonGroupVisibilty(false,"Editing");

}