Skip to main content

IBarGroup Interface

An item group on the Rich Text Editor‘s ribbon or toolbar.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public interface IBarGroup :
    IBarItemBase

Remarks

The Rich Text Editor can display its command bar in two ways:

The IBarGroup interface defines an item group on a toolbar or ribbon. Use the interface properties to change the group visibility or customize the group appearance.

The following code snippet customizes the first group on the Insert ribbon tab.

<DxRichEdit CustomizeRibbon=OnCustomizeRibbon @bind-Selection=@selection />

@code {
    Selection selection;

    void OnCustomizeRibbon(IRibbon ribbon) {
        IBarGroup firstGroup = ribbon.Tabs[RichEditRibbonTabNames.Insert].Groups[0];
        firstGroup.Text = "Insert Fields";
        firstGroup.IconUrl = "your-icon-url";
        firstGroup.GetVisible = () => selection.ActiveSubDocument.Type != SubDocumentType.TextBox;
        firstGroup.Items.Clear();
        firstGroup.Items.Add(RichEditBarItemNames.InsertFieldMenu);
    }
}
See Also