Skip to main content

IBarItemBase.Name Property

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

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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