Open lipchev opened 3 years ago
The problem is that the CancelViewModelAync
initiated by the DiscardChangesAsync
method on the DataWindow
triggers the CancelingAsync
event, to which the child view model responds first, before returning to the top level CancelAsync
method (where the confirmation code lies).
The quick-and-dirty solution I came up with is to override the DiscardChangesAsync
on my (custom) WizardWindow
, executing the CancelCommand
instead of directly calling the CancelViewModelAsync
method
Great find. We should indeed fix this in the WizardWindow. Interested in a PR?
Sure, I'll look into it..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)
Component
WizardWindow / WizardViewModel
Version of Library
4.2.0 / 4.3.0
Version of OS(s) listed above with issue
win10
Steps to Reproduce
CancelAsync
method on anyWizardPageViewModel
(e.g.SkillsPageViewModel
)Expected Behavior
The behavior is identical to the one used for the
CancelCommand
- that is theWizardPageViewModel.CancelAsync
is only called after the user confirms the cancellation (by default).Actual Behavior
The
CancelAsync
on theWizardPageViewModel
is called before the confirmation dialog is displayed (from the respectiveCancelAsync
method on theWizardViewModel
).