Skip to main content

BarItemCollectionBase<T>.Remove(Int32) Method

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

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public bool Remove(
    int index
)

Parameters

Name Type Description
index Int32

The tab, group, or item index.

Returns

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

<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 Customization Run Demo: Ribbon Customization

See Also