Alternative View / ViewModel Configurations

Throughout this chapter, we've demonstrated the scenario where we have a one-to-one relationship between the views and the ViewModels, with each ViewModel representing its corresponding view as a whole. This is an ideal scenario for learning the pattern (and reasonably common in practice), but it isn't a fixed requirement. Let's take a look at some additional configurations you may come across or want to use yourself.

One ViewModel Serving Multiple Views

In some scenarios, you may have one ViewModel that serves multiple views, such as a wizard. In this case, the ViewModel-first approach might be best.

One View Interacting with Multiple ViewModels

Alternatively, a single view may interact with multiple ...

Get Pro Business Applications with Silverlight 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.