O'Reilly logo

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF by Muhammad Shujaat Siddiqi, Ryan Vice

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

MVVM project billing sample

Now we will implement project billing using the MVVM pattern. Let's start by discussing the overall design.

MVVM design

The model, view, and view model are shown in the following screenshot, along with their relationships:

MVVM design

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.

View Models

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.

Note

Using multiple nested view models in this way is what I call hierarchical view models, and it is a topic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required