Back to Devexpress

WizardControl.FinishClick Event

windowsforms-devexpress-dot-xtrawizard-dot-wizardcontrol-06867789.md

latest2.4 KB
Original Source

WizardControl.FinishClick Event

Fires after the Finish button has been clicked.

Namespace : DevExpress.XtraWizard

Assembly : DevExpress.XtraWizard.v25.2.dll

NuGet Package : DevExpress.Win

Declaration

csharp
public event CancelEventHandler FinishClick
vb
Public Event FinishClick As CancelEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled.

Remarks

By default, clicking the Finish button has no effect, because no action is defined. Once clicked, the FinishClick event is raised. You should handle this event to perform the required task(s).

csharp
private void wizardControl1_FinishClick(object sender, EventArgs e) {
    finish = true;
    this.Close();
}

private void frmMain_FormClosing(object sender, FormClosingEventArgs e) {
    if(finish) return;
    if(XtraMessageBox.Show(this, "Do you want to exit the XtraWizard feature tour?",
            "XtraWizard", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
        e.Cancel = true;
}

If the XtraWizard control operates in modal mode, clicking the Finish button automatically closes the Wizard window. To prevent the window from being closed, set the event parameter’s Cancel property to true. If the XtraWizard control doesn’t operate in modal mode, setting the Cancel property has no effect.

See Also

WizardControl Class

WizardControl Members

DevExpress.XtraWizard Namespace