Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IBarItemBase Interface

In This Article

A base interface for a tab, group, and item on the Rich Text Editor‘s ribbon or toolbar.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public interface IBarItemBase

#Remarks

The following code snippet creates a custom group with the default Clipboard item.

Razor
<DxRichEdit CustomizeToolbar=OnCustomizeToolbar BarMode=BarMode.Toolbar/>

@code {
    void OnCustomizeToolbar(IToolbar toolbar) {
        BarGroupCollection groups = toolbar.Groups;
        groups.Clear();
        AddClipboardGroup(groups);
        // ...
    }

    void AddClipboardGroup(BarGroupCollection groups) {
        IBarGroup clipboardGroup = groups.AddCustomGroup();
        clipboardGroup.IconUrl = "_content/BlazorDemo/images/Paste.svg";
        IBarItem clipboardDropDown = clipboardGroup.Items.Add(RichEditBarItemNames.ClipboardMenu);
        clipboardDropDown.Name = "Clipboard";
        clipboardDropDown.Text = "Clipboard";
    }   
}

Add Default Item

Run Demo: Toolbar Customization

See Also