O'Reilly logo

Pro WPF and Silverlight MVVM: Effective Application Development with Model-View-ViewModel by Gary McLean Hall

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

Chapter 4. The ViewModel

In Chapter 3, we looked at the reasons for splitting model and view responsibilities and implementing a ViewModel to mediate between these layers.

Now we'll focus more closely on the responsibilities of the ViewModel, which is, arguably, the most important component of the MVVM pattern, as well as the least familiar. We will look at the overall structure of an application built around MVVM, including a deeper explanation of how each layer operates. Concentrating more fully on the ViewModel, we will examine its lifecycle—from construction to destruction. We will also see that the .NET Framework provides a number of interfaces and classes that can help us produce a rounded ViewModel with enduring utility. Finally, we'll look ...

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