Application wizard in Prism

Topics: Prism v4 - WPF 4
Aug 19, 2011 at 9:19 PM

I would like to make a wizard in my application. Where can I find an example of create the wizard?

I mean it win32consoleapp006.png (Previos, Next, Finish )

Developer
Aug 23, 2011 at 7:32 PM

Hi,

Prism doesn't provide support for wizards, however you could try doing something to this:

  1. Create a "wizard view" (and it's view model) that will used as the "wizard window." This view should have the regions where the views required by the wizard will be shown. Also, it may be convenient that this "wizard view" had its own scoped region manager (for more information about this, you can check this page on MSDN or this thread).
  2. Create the views and view models that will be used in the wizard. These can be used and navigated to like in a common prism application. For example, when clicking the "Previous" and "Next" buttons, the view inside the region that shows the content of the wizard could navigate to the next one and backwards.
  3. To store the results of the wizard and share them with the main application you can, for example, use a shared service that can be resolved using the container or imported when the "wizard view" is created. However, how to do this depends only of your preferences.
  4. Finally to show the view you can implement a behavior that shows the view in a new window. To do this you can check the Stock Trader Reference Implementation. This RI defines a behavior (the WindowDialogActivationBehavior in the desktop version and the PopupDialogActivationBehavior in the silverlight version) that makes it possible to show the view as a popup window.

For more information about this you can check: Stock Trader RI on MSDN.

I hope you find this useful,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Sep 6, 2011 at 5:35 PM

The Extended WPF Toolkit has a wizard control:

http://wpftoolkit.codeplex.com/

Developer
Sep 6, 2011 at 6:51 PM

Hi,

Thanks for sharing this with the rest of the community, as it might be useful for other users pursuing this scenario.

Regards,

Damian Cherubini
http://blogs.southworks.net/dcherubini