This is a video tutorial to introduce beginners to how to use both MVVM (Model-View-ViewModel) and MEF (Managed Extensibility Framework) with Silverlight (should work for versions 3 and 4). Of course, some “veterans” may want to watch as well in case you’ve missed some of the fundamentals, or have a clever way to do something that you can share in the comments for future visitors to the page.

In this edition, I build a simple application that allows the user to check a preference on the screen (whether they prefer squares over circles) and then displays a square or a circle. We use MVVM and wire everything together with MEF.

Download the source code: MEFMVVMDemoSln.zip

Click here to watch the video directly if it doesn’t appear in the frame below (recommended to watch in full screen): Watch the video in a separate window

Video Tutorial: Model-View-ViewModel with the Managed Extensibility Framework in Silverlight

Here is the final application:

Model-View-ViewModel example with the Managed Extensibility Framework in Silverlight

Download the source code: MEFMVVMDemoSln.zip

Jeremy Likness