Skip to main content
All docs
V24.1

IContextMenuItem.BeginGroup Property

Specifies whether to display the group separator before the item.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

bool BeginGroup { get; set; }

Property Value

Type Description
Boolean

true to display the group separator before the item; otherwise, false.

Remarks

The Rich Text Editor allows you to split context menu items into groups. A horizontal line separates groups. To start a new group, set the BeginGroup property to true.

<DxRichEdit CustomizeContextMenu=OnCustomizeContextMenu />

@code {
    void OnCustomizeContextMenu(IContextMenuItemCollection items) {
        items.Remove(RichEditContextMenuItemNames.CutSelection);
        items.Remove(RichEditContextMenuItemNames.CopySelection);
        items.Remove(RichEditContextMenuItemNames.Paste);
        var clipboardItem = items.AddCustomItem(0, "Clipboard");
        clipboardItem.BeginGroup = true;
        clipboardItem.Items.Add(RichEditContextMenuItemNames.CutSelection);
        clipboardItem.Items.Add(RichEditContextMenuItemNames.CopySelection);
        clipboardItem.Items.Add(RichEditContextMenuItemNames.Paste);
    }
}

RichEdit - Begin new group

Run Demo: Context Menu Customization

See Also