Question

I am implementing a MVVM pattern in my WPF application.

My application main window is divided into four parts:

  1. Main Menu On the Top
  2. Outlook Navigation Control on the Left.
  3. A List View on the Middle.
  4. Another List view on the bottom.

The Navigation control shows different setting (configuration) controls in the Tab items.

All the four above are user controls which are placed in the main window.

And corresponding to each user control there is separate view model which is bounded with a view model in the XAML of each control, however the model class remain the same between all the view model.

And a MainWindow has a seperate View Model which is also bounded with a view model in the XAML of each control.

Please help me out in framing a design in which each view models of all the controls above will interact with each other.

Please let me know if my question is not clear to you!!

Was it helpful?

Solution

Ideally your changes to the model should trigger the changes to the ViewModels. If I understand your question correctly you shouldn't need the ViewModels to interact directly with each other and might already have been answered here:

MVVM - what is the ideal way for usercontrols to talk to each other

OTHER TIPS

You might have a look at the sample projects of the WPF Application Framework.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top