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

DXTabControl.RemoveTabItem(Int32) Method

Removes the tab item with the specified index.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public virtual void RemoveTabItem(
    int index
)

#Parameters

Name Type Description
index Int32

An integer value that represents the zero-based index of the tab item that should be removed.

#Remarks

After a tab item has been removed using the RemoveTabItem method, it cannot be restored. To enable the tab item to be restored later, hide it via the DXTabControl.HideTabItem method. To learn more, see Showing and Hiding Tab Items.

Use the view‘s TabControlViewBase.RemoveTabItemsOnHiding property to force the DXTabControl to remove its tab items after they were hidden by an end-user, or via the DXTabControl.HideTabItem method.

Note

Tab items cannot be removed when the tab control is data bound (the ItemsSource property is assigned). In this instance, calling the RemoveTabItem method, or hiding a tab item with the TabControlViewBase.RemoveTabItemsOnHiding property set to true throws an exception.

See Also