Documentation

Pluralsight reference course



A Pluralsight course titled MVVM Light Toolkit Fundamentals is available! This is the best place to start and learn all about the toolkit.

The course will give you a full overview about each component of the MVVM Light Toolkit. In addition it will show a lot of samples for each of the components. The full course features 6 modules for a total of 4 hours and 30 minutes.

  • Module 1: Introduction to MVVM
  • Module 2: Refactoring the app to MVVM
  • Module 3: The Core Components
  • Module 4: The Extras
  • Module 5: Installing the MVVM Light and Additional Components
  • Module 6: Advanced Examples With MVVM Light

Xamarin

For more Xamarin content, check my Xamarin Evolve talk as well as the associated sample.

Using RelayCommand and Messenger with closures

This article describes how to use the RelayCommand, Messenger and WeakAction components with closures. This is a new feature added to V5.4 and above.

Navigation service

Initializing and using the MVVM Light NavigationService is slightly different depending on which platform it runs one. This series of articles shows how to do that on all supported platforms

Blog posts

My blog has a special category for all MVVM Light related announcements.

Source code documentation

The source code documentation is available as CHM (compiled HTML) and as a website. Please see this page for details.

The MVVM pattern (videos)

These videos give you an introduction from scratch about the Model-View-ViewModel pattern.

  • Understanding the MVVM Pattern: Introduction to the the MVVM pattern. This is the talk I gave at MIX10 and a few other occasions (this recording has extra 15 minutes for Windows Phone).
  • Deep Dive MVVM: An in-depth review of advanced techniques to implement decoupled applications. This is the MIX11 talk.

 

MSDN articles

I published a series of in-depth articles about the Model View ViewModel pattern at MSDN. Here is the list including sample code. Hopefully you will find these articles helpful!

  • Using the MVVM Pattern in Windows 8:
    Any programmer with previous experience in any of the XAML-based frameworks has probably at least heard of the Model-View-ViewModel (MVVM) pattern. Some have been using it extensively in all of their Windows Presentation Foundation (WPF), Silverlight or Windows Phone applications. Others have avoided it, either because they misunderstand what the pattern does, exactly, or because they don’t want to add what they see as a new level of complexity to their application.
    You don’t have to use the MVVM pattern to build XAML-based applications. It’s absolutely possible to use traditional patterns such as event-based interactions to create compelling apps. However, decoupled patterns such as MVVM bring quite a few advantages. Notably, the MVVM pattern can tremendously enhance the experience in Expression Blend and facilitate the designer-­developer workflow.
    Recently—and especially with the extension of XAML to new platforms such as Windows Phone and, of course, Windows 8—the usage of MVVM has grown to a whole new level, from a niche pattern that only a few enthusiast coders were using, to a mainstream practice encouraged by Microsoft.
    (more…)
  • IOC Containers and MVVM:
    Since the early days of object-oriented programming, developers have faced the issue of creating and retrieving instances of classes in applications and libraries. Various solutions have been proposed for this problem. For the past few years, dependency injection (DI)and inversion of control (IOC) have gained popularity among coders and have taken precedence over some older solutions such as the Singleton pattern.
    (more…)
  • Messenger and View Services in MVVM:
    In a previous article, “IOC Containers and MVVM,” I introduced the concept of how an IOC container can help create and locate instances of classes (services, helpers) in various consumer classes. The article showed that IOC containers can be very helpful in decoupled applications, such as those developed according to the Model-View-ViewModel pattern. This pattern is widely used to develop XAML-based applications (in Silverlight, Windows Presentation Foundation, Windows Phone, and Windows 8) because it fits well with the data-binding system and with the tools used to design the application, notably the Visual Studio Designer and Blend. For an introduction to the MVVM pattern applied to Windows 8, read the article “Using the MVVM Pattern in Windows 8” in MSDN Magazine.
    (more…)

  • Maximizing the Visual Designer’s Usage with Design-Time Data:
    In the two previous installments of this series about MVVM and the MVVM Light Toolkit, I talked about architectural considerations and organizing your application to benefit from the advantages of decoupled layers.
    In this installment, I’ll explore another big advantage of the MVVM pattern: using design-time data to facilitate the work in a visual designer tool. Currently, two visual designers can be used with Windows 8 XAML applications: the Visual Studio designer (integrated in Visual Studio) and Blend (a standalone application).
    (more…)

  • Commands, RelayCommands and EventToCommand:
    In previous installments of this series, I described the importance of decoupling the components of an application to make the application easier to unit test, maintain and extend. I also showed how adding design-time data makes it easier to work in Expression Blend or the Visual Studio designer in a visual manner.
    In this article, I take a closer look at one of the important components of any Model-View-ViewModel application: the command. Historically, the .NET Framework has always been an event-based framework: a class exposes an event that is raised by the class instances when subscribers need to be notified. On the other hand, the subscribers provide an EventHandler, which is typically a method with two parameters: the sender of the event and an instance of a class deriving from EventArgs. When the event is raised, the event-handling method is executed and the EventArgs instance carries additional information (if available) about what caused the event in the first place.
    (more…)

  • MVVM: The MVVM Light Messenger In-Depth:
    This series about the Model-View-ViewModel (MVVM) pattern and the MVVM Light Toolkit has covered quite a lot of ground since I started almost a year ago, from the use of IOC containers in MVVM applications to ways to handle cross-thread access and the DispatcherHelper component of MVVM Light. I also talked about commanding (with the RelayCommand and EventToCommand), view services, such as Navigation and Dialog services, and briefly discussed the Messenger component. The Messenger component is actually quite a powerful element of the MVVM Light Toolkit, one that often seduces developers thanks to its ease of use, but has also sparked some controversy because of the risks it can create if it’s misused. This component deserves its own article explaining how it works, what the risks are and the scenarios for which it makes the most sense.
    (more…)