Project DescriptionWPF user control (not a custom control) for generically hosting multiple-step wizards. Uses MVVM, you create the model and view for each step and optionally configure steps that guide the wizard along a different workflow.
Upon looking for a WPF wizard control, I came across
this project. It's a great implementation of a wizard, but I wanted a generic control. So I modified that project in the following ways:
- Made it generic: The classes that support the wizard take a type parameter that is the type of the object to be modeled by the wizard. The current code uses the wizard to model the same object the original project did: CupOfCoffee.
- Made the steps generic: The original project had the steps hard coded into the main wizard model's Xaml. In this project, the wizard model accepts a list of steps and the WizardView displays them dynamically.
- Allow for varying paths through the wizard: Any step can be configured to jump to a different step in the wizard's complete list of steps. The display of all possible steps will reflect the change in "workflow."
- Removed internationalization: I simply didn't have this requirement. Thus, I'd rather the UI just shows the actual names of enumerations of options (splitting the enum name into a readable display).
The basic steps for usage are:
- Designate an object with a parameter-less constructor to use as the "wizard business object."
- Create views and models for each step.
- Each step model descends from WizardStepViewModelBase.
- Set properties of WizardStepViewModelBase's instance of the wizard business object as necessary.
- If required, include a special option group that will change the workflow of the wizard.
- Create an instance of WizardViewModel.
- Pass a list of the steps (CompleteStep: model and view) to it.
- Display the WizardView (WizardViewModel is it's DataContext).
- See WizardClassDiagram for details.
- VS 2010