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.Name Property

Specifies the name for a bar element (tab, group, or item).

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
string Name { get; set; }

#Property Value

Type Description
String

The element name.

#Remarks

Use the Name property to specify a name for a tab, group, or item on the Rich Text Editor‘s ribbon or toolbar.

The following classes contain names of the built-in bar elements:

Class What Contains
RichEditRibbonTabNames Ribbon tab names
RichEditRibbonGroupNames Ribbon group names
RichEditToolbarGroupNames Toolbar group names
RichEditBarItemNames Ribbon and toolbar item names

The following code snippet customizes the Rich Text Editor’s ribbon as follows:

  • Clears the tab collection.
  • Adds the default Home tab to the collection.
  • Creates a custom Table tab.
Razor
<DxRichEdit CustomizeRibbon=OnCustomizeRibbon />

@code {
    void OnCustomizeRibbon(IRibbon ribbon) {
        // Clears the tab collection
        ribbon.Tabs.Clear();
        // Inserts a default tab
        ribbon.Tabs.Add(RichEditRibbonTabNames.Home);
        // Inserts a custom tab
        IRibbonTab tableTab = ribbon.Tabs.AddCustomTab("Table");
        tableTab.Name = "Table";
}
See Also