1

I am making a WPF application following MVVM model. I have seen some approaches for applying MVVM. I am concerned about my MainWindow.xaml. In some tutorials I have seen that MainWindow is only hosting a ContentControl, and in some first main page of the application.

I am making a wizard type application. There are multiple views with next and back buttons. There is one WelcomeView which is going to be the first view.

So my question is that what approach should I use. My window should contain a ContentControl pointing towards MainView or I copy paste all UI elements from WelcomeView to my MainWindow and get rid of WelcomeView.

Which is more suitable? What are Pros and Cons of each approach?

1
  • If WelcomeView is the first view, why not just delete MainWindow and use WelcomeView instead?
    – Scroog1
    Jan 30, 2014 at 13:17

1 Answer 1

1

We are using in our project MainWindow to display various messages like errors, warnings or questions.

Moreover if you're using composite application, MainWindow is divided into smaller parts. Every part contains separate part of information (View, ViewModel and Models).

This approach is similar to Regions in PRISM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.