Back to Devexpress

IBarItemBase.Name Property

blazor-devexpress-dot-blazor-dot-office-dot-ibaritembase.md

latest2.0 KB
Original Source

IBarItemBase.Name Property

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

Namespace : DevExpress.Blazor.Office

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
string Name { get; set; }

Property Value

TypeDescription
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:

ClassWhat Contains
RichEditRibbonTabNamesRibbon tab names
RichEditRibbonGroupNamesRibbon group names
RichEditToolbarGroupNamesToolbar group names
RichEditBarItemNamesRibbon 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

IBarItemBase Interface

IBarItemBase Members

DevExpress.Blazor.Office Namespace