DXTabControl.RemoveTabItem(Int32) Method
Removes the tab item with the specified index.
Namespace: DevExpress.Xpf.Core
Assembly: DevExpress.Xpf.Core.v24.1.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
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.