I used this article : http://www.codeproject.com/KB/WPF/InternationalizedWizard.aspx to create a WPF wizard to handle one of my user stories.
the problem I am facing now is that at some point in the Wizard pages, the user makes a choice which determines the next window that is going to be displayed and I can’t figure out how to handle this case.
You could change the logic in the
MoveToNextPagefunction to handle your special case. But if you do this I suggest moving that logic into another function that decides the next page based on the current state.Also, the simple index based solution probably won’t work very well once you have anything but a perfectly linear flow. To fix this, you could add some sort of
Nextreference to yourPagestructure, and leave in the special logic when on the appropriate page to ignoreNext. This solution is the same as iterating a linked list, then skipping to an alternate list (that feeds back into the same list) in a special case.If you want to go “perfect design” on it, you could come up with a less linear system to select pages (e.g. state machine). I’ll leave that up to you, though.
If you have to get too fancy, then you might want to consider a design that isn’t a wizard. Wizards are for linear flows, and if your flow isn’t linear, the wizard wouldn’t fit your model.