WizardControl.SelectedPageChanging Event

Enables you to control whether a wizard page can be selected.

Namespace: DevExpress.XtraWizard

Assembly: DevExpress.XtraWizard.v20.1.dll

Declaration

public event WizardPageChangingEventHandler SelectedPageChanging
Public Event SelectedPageChanging As WizardPageChangingEventHandler

Event Data

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

Property Description
Cancel Gets or sets whether the operation must be canceled.
Direction Gets a value that indicates in which direction a user navigates between pages. Inherited from WizardPageChangedEventArgs.
Page Gets or sets the current wizard page.
PrevPage Gets the previously active wizard page. Inherited from WizardPageChangedEventArgs.

Remarks

The SelectedPageChanging event is raised when a new page is about to be selected. This occurs when an end-user clicks the Next or Back button, or the page is selected in code.

Within the SelectedPageChanging event handler you can do the following:

To learn more, see Page Events.


private void wizardControl1_SelectedPageChanging(object sender,
DevExpress.XtraWizard.WizardPageChangingEventArgs e) {
    if(e.Page == wpLongText)
        e.Page.AllowNext = ceLongText.Checked;
    if(e.PrevPage == wpQuestion && e.Direction == Direction.Forward) 
        if(ceYesAnswer.Checked) e.Page = wpProgress;
    if(e.PrevPage == wpProgress && e.Direction == Direction.Backward)
        e.Page = wpQuestion;
}
See Also