Back to Devexpress

DXTabControl.RemoveTabItem(Int32) Method

wpf-devexpress-dot-xpf-dot-core-dot-dxtabcontrol-dot-removetabitem-x28-system-dot-int32-x29.md

latest2.3 KB
Original Source

DXTabControl.RemoveTabItem(Int32) Method

Removes the tab item with the specified index.

Namespace : DevExpress.Xpf.Core

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public virtual void RemoveTabItem(
    int index
)
vb
Public Overridable Sub RemoveTabItem(
    index As Integer
)

Parameters

NameTypeDescription
indexInt32

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

HideTabItem

DXTabControl Class

DXTabControl Members

DevExpress.Xpf.Core Namespace