WPF - MVVM - View Model Hierarchy

Can someone give me an example why I need a ViewModel? taht contains two sub view models? and how to implement it?

+5
source share
2 answers

Assuming you have a “MainContainer” that is your top-level ViewModel, you might need two different sub-model models: one for the “Menu” and one for the content that the menu points to.

It can be implemented as follows:

public MenuViewModel Menu;
public ContentViewModel Content;

, . viewmodels , , "" . , .

+3

MSDN. , , , , , WPF, MVVM, EF4 POCOs.

+1

All Articles