Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF MVVM UserControl Binding to create a Wizard UI

Tags:

c#

mvvm

wpf

c#-4.0

I m working in a WPF MVVM Project and I am using one Wpf Window. In this window i have a space for one usercontrol and two buttons next and back. When i click the next button I want usercontrol1 to be replaced with usercontrol2. etc.

like image 777
atul gupta Avatar asked Jul 01 '10 04:07

atul gupta


2 Answers

Sounds like you're trying to create a wizard-style user interface.

This Code Project article may help. And right here is a good place for getting started too.

like image 119
Paul Sasik Avatar answered Nov 05 '22 20:11

Paul Sasik


You can have Wizard user control which is binded to WizardModel, In the Wizard control put ContentPresenter control, and bind it to WizardModel's WizardPage property. And by changing that WizardPage property, you can change wizard page from model.

Hope this helps, here used the same mechanism for changing views

like image 31
Arsen Mkrtchyan Avatar answered Nov 05 '22 19:11

Arsen Mkrtchyan