开发者

WPF MVVM UserControl Binding to create a Wizard UI

开发者 https://www.devze.com 2023-01-05 03:45 出处:网络
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 u

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

0

精彩评论

暂无评论...
验证码 换一张
取 消