Change log

MVVM Light change log


In V4.0.0 beta 1

General changes

Setup

Messenger

  • Fixed Issue #7521: race condition in Messenger.Default.
  • Fixed Issue #7539: Messenger support for uncast objects.

ViewModelBase

  • Added support for RaisePropertyChanged(null) and RaisePropertyChanged(string.empty). A blog post about this will follow.
  • Fixed Issue #7520: RaisePropertyChanged() fails in ReleaseBuild. This overload was removed because of the many issues, and replaced by the Set methods.
  • Added Set(...) methods. A blog post about this will follow.

RelayCommand

  • Fixed Issue #7522: used deprecated Predicate instead of Func.
  • Fixed Issue #7534: RelayCommand has security issue.

SimpleIoc

  • Implemented method IsRegistered<T>(). A blog post about this will follow.
  • Fixed issue "Contains<T>() is returning true even if no instance was already instantiated". Contains<T>() only returns true if an instance is already created. IsRegistered<T>() returns true if the class has been registered with the IOC container.
  • Fixed issue "Instances get created at registration already when registered with a key and a factory". Registering the instance does not execute the factory method yet. The method is only executed when the method GetInstance is called the first time.
  • Fixed issue "Use the correct DLLs for CommonServiceLocator". The original DLLs from http://commonservicelocator.codeplex.com are now used everywhere.

DispatcherHelper

  • The class was moved from GalaSoft.MvvmLight.Extras.dll into GalaSoft.MvvmLight.dll.

Project Templates

  • A couple of internal changes to the template's structure.
  • Using the new slightly modified MVVM Light logo.

ViewModelLocator Template

  • Modified template to use SimpleIoc.
  • A couple of internal changes to the template's structure.
  • Using the new slightly modified MVVM Light logo.

ViewModel Template

  • A couple of internal changes to the template's structure.
  • Using the new slightly modified MVVM Light logo.

View Template

  • Fixed issue in XAML for WP7 and WP7.1 templates.
  • A couple of internal changes to the template's structure.
  • Using the new slightly modified MVVM Light logo.

INPC snippet

  • Setter in property is now public.
  • Added $end$ marker.
  • Added new snippets with various ways to call RaisePropertyChanged.
  • Added a snippet using the new ViewModelBase.Set() method.
  • A blog post will follow about all this.

ViewModelLocator property snippet

  • Added $end$ marker.
  • Modified to use SimpleIoc.

Relay Command snippets

  • Added code snippets for RelayCommands. A blog post about this will follow.

Details

XmlnsDefinitionAttribute for GalaSoft.MvvmLight.Command in Extras assembly

Thanks to the addition of XmlnsDefinitionAttribute, you can simplify the inclusion of the MVVM Light EventToCommand action in XAML. See the before and after below:

Before:

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
             
             xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.SL4"
             
             xmlns:cmd="http://www.galasoft.ch/mvvmlight" 
             x:Class="MvvmLight4.MainPage">

After:

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
             xmlns:cmd="http://www.galasoft.ch/mvvmlight" 
             x:Class="MvvmLight4.MainPage">