Back to Devexpress

BarItemCollectionBase<T>.Remove(String) Method

blazor-devexpress-dot-blazor-dot-office-dot-baritemcollectionbase-1-dot-remove-x28-system-dot-string-x29.md

latest1.9 KB
Original Source

BarItemCollectionBase<T>.Remove(String) Method

Removes a tab, group, or item with the specified name from a tab, group, or item collection.

Namespace : DevExpress.Blazor.Office

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public bool Remove(
    string name
)

Parameters

NameTypeDescription
nameString

The tab, group, or item name.

|

Returns

TypeDescription
Boolean

true if the tab, group, or item is removed; otherwise, false.

|

Remarks

The Remove method overloads allow you to remove the following bar elements:

The following code snippet removes tabs from the ribbon.

razor
<DxRichEdit CustomizeRibbon=OnCustomizeRibbon />

@code {
    void OnCustomizeRibbon(IRibbon ribbon) {
        // Removes the tab with index 0
        ribbon.Tabs.Remove(0);
        // Removes the File tab
        ribbon.Tabs.Remove(RichEditRibbonTabNames.File);

    }
}

Run Demo: Toolbar CustomizationRun Demo: Ribbon Customization

See Also

BarItemCollectionBase<T> Class

BarItemCollectionBase<T> Members

DevExpress.Blazor.Office Namespace