Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit b3276e3 makes Cancel button stop working #96

Open
boz70 opened this issue Apr 5, 2023 · 0 comments
Open

Commit b3276e3 makes Cancel button stop working #96

boz70 opened this issue Apr 5, 2023 · 0 comments

Comments

@boz70
Copy link

boz70 commented Apr 5, 2023

Commit b3276e3 inverts the logic of the Cancelling event's CancelEventArgs.Cancel property. Cancel = true now behaves as documented for System.ComponentModel.CancelEventArgs: it cancels the Cancelling operation which results in ignoring the user's cancel action (pressing the button). This is a breaking change to existing code handling the Cancelling event starting with V2.2.8. What makes it worse is the fact that the Cancel property is still initialized with true which makes the Cancel button being ignored.

As a fix the CancelEventArgs.Cancel property should be initialized with false so that by default the Cancel button closes the wizard.

A workaround is handling the Cancelling event and resetting the Cancel property

private void wizardCtrl_Cancelling(Object sender, System.ComponentModel.CancelEventArgs e)
{
	e.Cancel = false;
}

or revert to V2.2.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant