Change log

MVVM Light change log

In V4.2.30.0

Important note: V4.2.30 is only available on Nuget (here and here) at the current time. An installer will be published soon with changes to the project and item templates too.

Misc

  • Removed unused precompiler directives.
  • Cleaned up some documentation.
  • Handling some precompiler warnings.
  • The MVVM Light Nuget package now uses the MVVM Light "Libs only" Nuget package.

Xamarin support

  • MVVM Light now builds for Xamarin Android and iOS.

ObservableObject, ViewModelBase

  • Added CallerMemberName attribute to RaisePropertyChanged and RaisePropertyChanging methods (only NET45, WIN8, WP8).

DispatcherHelper

  • Showing better error is DispatcherHelper is not initialized.

SimpleIoc

  • If a class is already registered for a given interface, ignore and move on.
  • Using the Microsoft.Practices.ServiceLocation from Nuget where available.

WeakAction

  • Modified WeakAction to take advantage of MethodInfo (WIN8).
  • Fixing possible race conditions in WeakAction and WeakFunc.

EventToCommand

  • Added EventArgsConverter

Messenger

  • Using the standard Messenger in WIN8 too.
  • Issue 7581:Deadlock with Register and Send

Project and item templates

  • Simplified template folder structure.
  • WPF45 templates reference the correct DLLs.

Nuget

  • Removed transformation of App.xaml and replaced with Powershell script instead. This fixes issues we had in Windows 8 notably.

In V4.1.26.0

Miscellaneous

  • BL0023.003, Change source structure to include Windows 8 in the normal flow of the folders
  • BL0023.004, Remove UniversalConverter
  • BL0023.005, Issue 7594: VS 2012 XML Design time error
  • BL0023.007, Remove INPChanging temporarily to solve design time issues (WP7.1 only)
  • BL0009.006, Ported to .NET 4.5
  • BL0009.007, Ported to Windows Phone 8

SimpleIoc

  • BL0005.001, Issue 7577: SimpleIoc misleading error when class has private constructor
  • BL0005.003, An exception can occur when a class has a static constructor and a default constructor, even when they are not explicitly declared.
  • BL0005.007, ContainsCreated should return true if called without a key, if a keyed instance is found

EventToCommand

  • BL0004.005, The type 'EventToCommand' from assembly 'GalaSoft.MvvmLight.Extras.WPF4' is built with an older version of the Blend SDK, and is not supported in a Windows Presentation Framework 4 project.

DispatcherHelper

  • BL0004.001, Rename InvokeAsync in RunAsync
  • BL0004.002, Return DispatcherOperation (or IAsyncOperation in Win8) for RunAsync.

In V4.0.23.0 (V4 RTM)

Miscellaneous

  • BL0019.002, Add mvvmvm snippet (this creates a property returning the DataContext casted to viewmodel type).
  • BL0019.004, Port to Windows 8
  • BL0021.004, Make sure that all assemblies are signed
  • BL0021.005, Make sure to add XML and PDB files where needed
  • BL0021.006, Make sure that all reference assemblies are Release mode

Setup

  • BL0006.002, Issue #7544: Add Windows 8 to NuGet
  • BL0006.003, Support all Express editions (currently supporting VCS Express 2010 (WPF3.5 SP1 and WPF4), VWD Express 2010 (Silverlight 3, 4 and 5), WPD Express 2010 (Windows Phone) and VSWIN Express 2011 (Metro style).
  • BL0006.004, If both Visual Studio normal and Express editions are installed, support both
  • BL0007.001, Remove duplication of snippets files (in setup source folder)
  • BL0008.001, Snippets do not appear correctly after installation
  • BL0008.002, Installing for VS11 on Windows 7 too

Messaging

  • BL0011.001, Method OverrideDefault should take an IMessenger
  • BL0011.004, Worked on solving memory leaks when using the Messenger class.
  • BL0013.002, Issue #7519: Constraining Send by a base class does not work
  • BL0013.006, Issue #7524: unnecessary complicated method Messenger.Implements
  • BL0013.008, Issue #7525: multiple race conditions in Messenger using recipients collections
  • BL0014.001, Issue #7562: Sending a null message with a token causes an exception
  • BL0014.005, Issue #7556: KeyNotFoundException in Messenger.SendToTargetOrType

ViewModelBase

  • BL0010.001, Constructor is not public
  • BL0011.001, Implement INotifyPropertyChanging. The event PropertyChanging is now available in all frameworks and RaisePropertyChanging is implemented too.
  • BL0011.006, Issue #7523: ViewModelBase's unnecessary dependence on specific Messenger
  • BL0011.008, Issue #7533: VerifyPropertyName doesn't check for ICustomTypeDescriptor implementation
  • BL0012.001, Issue #7551: Enhance ViewModelBase.Set/ObservableObject.Set. These methods now return true if the value was set (and the corresponding events raised).
  • BL0012.002, Issue #7552: Possible NullReferenceException in RaisePropertyChanged
  • BL0012.004, Issue #7557: Try to remove the check for process name in IsInDesignMode
  • BL0012.007, Issue #7518: VerifyPropertyName should ignore strings that are null or empty
  • BL0012.008, Issue #6989: RaisePropertyChanged should not raise event for string.Empty (also Issue #6993)
  • BL0013.003, Discussion #212293: RaisePropertyChanged(null) not supported
  • BL0013.004, VMBase.Set should also return a boolean like ObservableObject.Set
  • BL0013.005, VMBase.Set must also raise PropertyChanging event

RelayCommand

  • BL0008.004, Issue #7532: CanExecuteChanged event handler should be saved as WeakReference
  • BL0009.003, Issue #7529: Generic RelayCommand and Value Types
  • BL0010.001, Make the Execute method virtual
  • BL0010.002, Issue # 7546: RelayCommand - RaiseCanExecuteChanged: Changed behavior: This changed behavior was reverted and the RelayCommand is now using the CommandManager again in WPF.
  • BL0010.004, Issue when delegate is to a static method, command is not executed

SimpleIoc

  • BL0002.003, GetAllInstances should auto-create default instances and factories
  • BL0002.004, Add GetAllCreatedInstances. This method returns only already created instances, without auto creating them.
  • BL0002.005, Issue #7570: Issue when unregistering IDataService. Registering and then immediately unregistering an interface would prevent the user to register the same interface again.

DispatcherHelper

Project Template

  • BL0006.002, When creating Windows Phone projects, the GUID in WMAppManifest.xml is always the same
  • BL0007.001, Splash screen for Win8 template is distorted
  • BL0007.002, Add xmlns:ignore to each XAML file. See Quick tip: Commenting out properties in XAML
  • BL0007.004, StoreLogo.png should be 50x50 only (win8)

ViewModelLocator Template

  • BL0006.001, Make sure that instructions mention "using" instead of clr-namespace for Windows 8

ViewModel Template

  • BL0006.001, Make sure that instructions mention "using" instead of clr-namespace for Windows 8

View Template

INPC Snippet

  • BL0006.001, All INPC snippets should use RaisePropertyChanging.

RelayCommand Snippet

  • BL0001.001, Issue #7547: mvvmrelaymethodcanexecute is missing
  • BL0001.002, Shortcut mvvmrelaycanexecutegeneric should be mvvmrelaygenericcanexecute

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">