
MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

Now we will implement project billing using the MVVM pattern. Let's start by discussing the overall design.
The model, view, and view model are shown in the following screenshot, along with their relationships:
The view is now empty, and all of the explicit relationships that we've created between our classes are between the model and view model.
We will need two view models for this application. Each view model has its own area of responsibility in the view, as shown in the next screenshot.
Using multiple nested view models in this way is what I call hierarchical view models, and it is a topic that will be explored in more detail in Chapter 6, Northwind — Hierarchical View Model and IoC.
The ProjectViewModel
view model will contain the view state and view logic for ProjectsView
. The following screenshot shows the mapping between Projects and ProjectsViewModel:
The property bindings and their responsibilities are shown as...
Change the font size
Change margin width
Change background colour