Skip to main content

DXTabControl.TabHiding Event

Occurs before a tab item is hidden.

Namespace: DevExpress.Xpf.Core

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

#Declaration

public event TabControlTabHidingEventHandler TabHiding

#Event Data

The TabHiding event's handler receives an argument of the TabControlTabHidingEventArgs type. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets whether to cancel the action. Inherited from TabControlTabShowingEventArgs.
TabIndex Gets the index of the processed tab item. Inherited from TabControlTabShownEventArgs.

#Remarks

Handle the TabHiding event to prevent hiding a tab item. To do this, set the event parameter's TabControlTabShowingEventArgs.Cancel property to true.

To obtain the index of the tab item that is being hidden, use the event parameter's TabControlTabShownEventArgs.TabIndex property. Use the DXTabControl.GetTabItem method to obtain a tab item by its index.

After the tab item has been hidden, the DXTabControl.TabHidden event is fired.

To learn more, see Showing and Hiding Tab Items.

Handle the DXTabControl.SelectionChanging or DXTabControl.SelectionChanged event to cancel selecting a tab item or respond to this action respectively. For details, see Navigating Between Tab Items.

See Also