Back to Devexpress

XtraTabControl.Deselecting Event

windowsforms-devexpress-dot-xtratab-dot-xtratabcontrol-fc6c727a.md

latest4.2 KB
Original Source

XtraTabControl.Deselecting Event

Occurs when a page is about to be deselected, and allows cancellation of the operation.

Namespace : DevExpress.XtraTab

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Action")]
public event TabPageCancelEventHandler Deselecting
vb
<DXCategory("Action")>
Public Event Deselecting As TabPageCancelEventHandler

Event Data

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

PropertyDescription
ActionGets the action being performed on a tab. Inherited from TabPageEventArgs.
CancelGets or sets whether the event must be canceled.
PageGets the currently processed page. Inherited from TabPageEventArgs.
PageIndexGets the index of the current page. Inherited from TabPageEventArgs.

Remarks

When selecting a specific page, the following events occur in the following order:

The XtraTabControl.Deselecting and XtraTabControl.Selecting events provide a Cancel parameter that allows you to prevent a specific page from being deselected and selected, respectively.

In addition to these events, the XtraTabControl provides the XtraTabControl.SelectedPageChanging and XtraTabControl.SelectedPageChanged events, that also allow you to respond to the active page change. The XtraTabControl.SelectedPageChanging event provides two parameters (Page and PrevPage) that refer to the pages between which focus is about to be moved. This event can be handled to prevent the active page from being changed.

If the animation is enabled (see XtraTabControl.Transition), the XtraTabControl.SelectedPageChangeAnimationCompleted event fires when the animation completes, allowing you to perform required actions (e.g., focus a particular control) on the activated page.

See Also

SelectedTabPage

SelectedTabPageIndex

SelectedPageChanging

SelectedPageChanged

Deselected

Selecting

Selected

SelectedPageChangeAnimationCompleted

XtraTabControl Class

XtraTabControl Members

DevExpress.XtraTab Namespace