Silverlight Feeds - All your Silverlight feeds in one place.

Sponsors

Monday, September 12, 2011

MVVM Light V4 beta1

by Laurent Bugnion via Silverlight on 9/12/2011 4:00:20 PM

This morning, I published MVVM Light V4 beta1 in the form of an MSI. The installation instructions are detailed on the MVVM Light installation page. Please make sure to uninstall previous versions before you install V4 beta1.

There are quite a few changes in this version, and I plan to blog about various features in the coming days. As usual, stay tuned!

Change log

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

 

email it!bookmark it!digg it!

Original Post: MVVM Light V4 beta1

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us