WPF MVVM UserControl Binding to create a Wizard UI
I m working in a W开发者_如何学运维PF 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.
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.
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
精彩评论