O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

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

ViewModelBase Class

Windows Phone apps often consist of many pages and, in turn, many viewmodels. It is useful to employ a viewmodel base class to share common infrastructure across all viewmodels in your app.

In the samples throughout this book, most viewmodels subclass a custom ViewModelBase class that provides, among other things, navigation support, error validation, state preservation, and property change notification (see Figure 2.9). Each of these capabilities is discussed alongside related topics in subsequent chapters.

Image

FIGURE 2.9 ViewModelBase class diagram.

ViewModelBase inherits from a custom NotifyPropertyChangeBase class, which provides ...

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