Back to Devexpress

DXTabControl.TabHiding Event

wpf-devexpress-dot-xpf-dot-core-dot-dxtabcontrol-7a59e122.md

latest3.1 KB
Original Source

DXTabControl.TabHiding Event

Occurs before a tab item is hidden.

Namespace : DevExpress.Xpf.Core

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public event TabControlTabHidingEventHandler TabHiding
vb
Public Event TabHiding As TabControlTabHidingEventHandler

Event Data

The TabHiding event's data class is TabControlTabHidingEventArgs. The following properties provide information specific to this event:

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
ItemGets the tab item that raised the event. Inherited from TabControlCommonCancelEventArgsBase.
TabIndexGets the index of the tab that raised the event. Inherited from TabControlCommonCancelEventArgsBase.

Remarks

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

To obtain the index of the tab item that is being hidden, use the event parameter’s TabControlTabHidingEventArgs.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 Header Menu.

See Also

HideTabItem

TabHidden

GetTabItem

DXTabControl Class

DXTabControl Members

DevExpress.Xpf.Core Namespace