Building a simple MVVM framework

It should be clear at this point that MVVM-based applications have a lot of elements in common, such as change notifications and commands. It would be beneficiary to create a reusable framework that we can simply leverage in many applications. Although there are several good frameworks out there (most are free), building such a framework ourselves will enhance our understanding and may prove easier to extend than other frameworks, which we may be less familiar with.

Getting ready

Make sure Visual Studio is up and running.

How to do it...

We'll create a reusable class library to serve as a basis of a simple MVVM framework and use it (and extend it) in later recipes:

  1. Create a new WPF UserControl Class Library project ...

Get Windows Presentation Foundation 4.5 Cookbook 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.