Suppose I have a window called MainWindow.
Inside that I have a Menu and a Frame, which is used to display a page associated with SelectedMenuItem.
Suppose I have 10 pages named Page1, Page2, ......, Page10. Now I would like to display those pages in Frame. All the pages has got some standard controls like TextBox, TextBlock, ComboBox etc.
Functionality :
- User Clicks on any MenuItem and a page associated with that MenuItem Is displayed to him.
- He will fill all the TextBoxes and ComboBoxes with data as per his needs.
- He will click on Save Button (Please note that save Button is located on MainWindow and not on any Page.)
- Steps 1,2,3 continues till user's wish.
Now, my questions are :
- Should I use a ViewModel per Page?
- Should I use only 1 ViewModel?
- What are the advantages and dis-advantages of using a Single ViewModel?
- What are the advantages and dis-advantages of using a Multiple ViewModels?
- If you say that I should use Multiple ViewModels, then how should I refer to properties of one ViewModel in another ViewModel?
Please don't say that it depends on the programmer's mind. I have asked these questions because I want to create a small Data-entry application. And I would like it to be maintainable. Also, I would like to create the application in best way possible.