This project has moved and is read-only. For the latest updates, please go here.

Wizard: Command Binding for MVVM

Oct 21, 2011 at 8:40 PM


I first want to start a discussion for if I maybe miss it, but I cannot see events suitable for Commanding in the Wizard control. I am using it in a MVVM application so I would need to use RelayCommands to properly use it.

If I missed it, sorry.



Oct 21, 2011 at 8:44 PM

You are correct. There are no events or MVVM supported commands available.  Honestly, I have not received any real feedback on the Wizard control so it hasn't been touched in awhile.  Please fell free to start listing the features you believe it should have.  I will see what I can do about getting them in there.

Oct 21, 2011 at 9:10 PM
Edited Oct 21, 2011 at 9:11 PM

I only started out with it yesturday and worked a bit with it today. Working with it in the designer is an absolute pain, but luckely there are ways around that, so that is not major.

If you can add MVVM commands to it which can handle the paging etc it would be great. Another small thing. The Next and Previous buttons are too close to each other. I am busy with a Metro app and with that, there is not space between the buttons which looks a bit odd. If all the buttons can be equally spaced, it would be great.

That is the issues I had with it thusfar. Will post some more when I run into more issues.

I will see if I got time over the weekend to help you in getting some of this done.

Thanks for all the effort!

Nov 1, 2011 at 3:06 PM

If you have access to the Expression (Microsoft.Expression.Interactions.dll) framework you can bind the wizard commands to your VM commands using EventTrigger and InvokeCommandAction.

Example, binding the Finish and Cancel wizard commands to the CloseCommand of my VM with different parameters:

	<i:EventTrigger EventName="Finish">
		<i:InvokeCommandAction Command="{Binding CloseCommand}" CommandParameter="True" />
	<i:EventTrigger EventName="Cancel">
		<i:InvokeCommandAction Command="{Binding CloseCommand}" CommandParameter="False" />
Good luck.