WildGums/Orc.Wizard

Where to place the Finish Wizard action/procedure?

Closed this issue · 5 comments

Hello,

Sorry if this is the wrong place to put this question. But, where do you tie in the procedure you want to run when the wizard is finished?

You're using your implementation of WizardBase or IWizard (which is a wizard model) as an argument for ShowWizardAsync() method.
This method returns bool value. If it returned true then user has pushed 'Finish' button. Now you can use wizard model for implementing "Finish Wizard action"
Another way is you just can override SaveAsync() method in your implementation of WizardBase and/or in your implementations of WizardPageBase

Thanks for the info. One more question. What is the best way to access the ViewModels of the individual pages? wizard.Pages?

why you need to get access to the ViewModel of page? you can use another way. You can (should) pass your data like this: PageView <=> PageViewModel <=> PageModel (WizardPageBase)
in such case your can always get access to required data from wizard

stale commented

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.

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.