This project has moved and is read-only. For the latest updates, please go here.

Windows phone 8 support

Oct 11, 2012 at 9:42 AM

Are there any plans for providing support for Windows Phone 8 in the nearby future?

Oct 11, 2012 at 5:47 PM


Absolutely. In fact it is already built, but I cannot release DLLs publically before the SDK is public.

If you do have access to the WP8 SDK, please send me an email (Laurent at galasoft dot ch)



Nov 17, 2012 at 5:17 PM

WP 8 is supported in the PCL version here:

Nov 17, 2012 at 5:23 PM

Note however that I am not supporting the PCL version, at least not yet. The PCL version uses some unofficial DLLs to support the System.Windows.Interactivity namespace.

There is a Windows Phone 8 version available in V4.1 of MVVM Light, see the Download section of this site.



Nov 17, 2012 at 6:47 PM

The DLLs are the signed, official Microsoft ones, at least for platforms other than NetCore4.5/Metro.


Nov 17, 2012 at 6:49 PM

OK I guess I misunderstood the "unofficial" moniker then. Maybe a better naming would be wise here, I know for sure that "unofficial" is going to frighten some people.


Dec 13, 2012 at 12:11 PM

Hi all,

today WP8 is fully released, but each time I install Mvvm light toolkit from NuGet, I get the reference to the WP7 assembly.

Do I miss something ? Or is WP8 support not ready ?



Dec 13, 2012 at 12:15 PM

Hi Tim,

The Portable.MvvmLightLibs package on NuGet has been tested with WP8, though it does use WP7 assemblies.

WP7 assemblies are fully supported for WP8 apps. MVVM Light doesn't currently have any WP8-specific code, so by releasing it as WP7, it works for both.

If you run into any issues please let me know if you run into any issues -- just make sure you have NuGet 2.1 or later installed first.


Dec 13, 2012 at 12:23 PM

Hi Oren,

in fact, I encounter problem with the EventToCommand. No event is trigerred with this, SelectionChanged event, Loaded event ... nothing.

Is there an incompatibility with WP8 ? It was working with WP7

Best regards

Dec 13, 2012 at 12:45 PM

HI Tim,

Do you have a simple solution you can share with a repro? I can look into it later this afternoon and get a fix for it posted.


Dec 13, 2012 at 1:45 PM
Edited Dec 13, 2012 at 1:47 PM

Not here, tomorrow if needed.

You can reproduce it with an easy sample.

Create a new Windows Phone 8 projet, Nuget for Mvvm Light toolkit, 

On the view, set :

<ListBox ItemsSource="{Binding MyList}">
        <Interactivity:EventTrigger EventName="SelectionChanged" >
            <Command:EventToCommand Command="{Binding SelectionElementCommand}" PassEventArgsToCommand="True"/>
            <TextBlock Text="{Binding}" Margin="10 30 0 0" />

with :


On the view-model, you have :

public ICommand SelectionElementCommand { get; set; }


SelectionElementCommand = new RelayCommand<SelectionChangedEventArgs>(OnSelectionElement);

with :

private void OnSelectionElement(SelectionChangedEventArgs args)



My list is :


public const string MyListPropertyName = "MyList";
private List<string> myList = null;
public List<string> MyList
        return myList;

    private set
        if (myList == value)
        myList = value;


If it's not enough for you, I can create a sample solution for tomorrow.



Dec 13, 2012 at 1:47 PM

Hi Tim,

I'll take a look, but can you confirm which MVVM Light you're using? Are you using the regular one or the Portable.MvvmLightLibs package? You might need to enable searching for "pre-release" packages due to its dependency on Microsoft.Bcl (which is beta).

Dec 13, 2012 at 2:12 PM

the regular one

Dec 13, 2012 at 2:23 PM


If you are using the regular MVVM Light package, you need to use the WP8 DLLs to enable EventToCommand. Unfortunately these are not in Nuget yet. Please download the WP8 DLLs from!1052


Dec 13, 2012 at 2:44 PM

Thanks Laurent,

hope you can publish a NuGet package soon.

Best regards and thanks for the good work :)

Dec 13, 2012 at 4:36 PM

Hi Tim,

Could you please try the portable package and let me know if it works for you? There's additional fixes there beyond what's in the main release too. That portable package supports all platforms with the same binaries.


Dec 19, 2012 at 9:16 AM

The link have been updated.


to have the new zip ""

Hope this helps


WP8 developer

Jan 17, 2013 at 1:32 PM

I am using the latest version from NuGet, downloaded today

GalaSoft.MvvmLight.Extras.WP8 Version, 

Visual Studio 2012, Windows Phone 8 app

Error 1 The type 'EventToCommand' from assembly 'GalaSoft.MvvmLight.Extras.WP8' is built with an older version of the Blend SDK, and is not supported in a Windows Presentation Framework 8 project. 

I tried with the DLL from (previous link given above) but it still doesn't work


Jan 17, 2013 at 4:06 PM

Hi nitescua,

If you try the Portable.MvvmLightLibs package (the PCL fork), that one includes references to the latest official Blend SDK and Common Service Locator binaries and should resolve the issue for you.


Jan 17, 2013 at 4:07 PM
Edited Jan 17, 2013 at 4:10 PM

Hi Oren,

Are these available by NuGet? how to get them exactly?

I would appreciate if Laurent can give any hints on this. I do not wish to work with a fork version.


Jan 17, 2013 at 4:09 PM

They are on NuGet. I'd recommend uninstalling the regular ones first to prevent dll conflicts, but you can search for "Portable.MvvmLightLibs" in the NuGet search dialog or by using the command line: Install-Package Portable.MvvmLightLibs -Version



Jan 17, 2013 at 5:09 PM

Hi Andrei,

The error you posted is weird. You talk about Windows Phone application but the error mentions "Windows Presentation Framework 8". 

It sounds like you are using the wrong DLLs in your project. Can you make sure that you the error is correct?


Jan 17, 2013 at 5:14 PM

I used NuGet to get the package today in a Windows Phone 8 app.

The error appeared as soon as I wanted to use the EventToCommand from the Extras assembly.


Jan 17, 2013 at 5:29 PM


Just tried creating a new Windows Phone 8 application and adding the MVVM Light Libs only package. I was able to add an element and use EventToCommand to link the element's Loaded event to a Command on my page.

Then I created another Windows Phone 8 app and added the MVVM Light package (full). I added the same command to the ViewModel, had to fix a small issue in XAML (will check it out in the next release) and then added the EventToCommand in Blend and bound to the VM's command.

I didn't get any compilation errors.

Do you want to send me your project for me to take a look>


Jan 17, 2013 at 5:33 PM

Thank you Laurent.

I haven no idea what's going on. I actually did try by removing and reinstalling but without no luck.

I will do a new project to test in few minutes and let you know.

Thanks again.

Jan 17, 2013 at 6:18 PM

I removed MVVMLight again, deleted the directory in packages folder (it couldnt delete System.Windows.Interactivity, even after VS restart), added MVVMLight by NuGet, everything works now, I'm good

No idea what happened.

Thanks and I am sorry for the trouble, Laurent.


Off-topic question: Did SimpleIoc have support before for creating new instances of types something like this:

.Register<IMyInterface, MyInterface>( ()=> { return new MyInterface(); } )

The problem I have is I do not want the view models instances to be reused. The only way I see is to replace SimpleIoC with a different IoC.

Any idea how to do this without using a different IoC?

Another way of asking this is, how are people generally working with view-models, isn't it simpler if view-models exist only as long as the views exists? ViewModels can pass a state (a view-model state object) to one another. Having to clean-up properties to reinitialize the view-model doesn't look right for me. Or maybe my approach is wrong?


Feb 9, 2013 at 4:17 PM
@onovotny I'm still getting a similar error with the Portable branch. Looks fine with the regular libs though. (I am on Nuget 2.2)

1-Built a new WP8 App.
2-Installed the latest portable branch from nuget (4.1.27 from feb 8th)
3-Add the namespaces
4-Add an event to command
<Rectangle Fill="White"
                    <i:EventTrigger EventName="MouseEnter">
                        <cmd:EventToCommand Command="{Binding TestCommand, Mode=OneWay}" />
Immediately get errors. I also tried it with an older version (
Error The tag 'EventToCommand' does not exist in XML namespace 'clr-namespace:GalaSoft.MvvmLight.Command;assembly=Galasoft.MvvmLight.Platforms.WP75'.
Error The type 'EventToCommand' from assembly 'GalaSoft.MvvmLight.Platforms.WP75' is built with an older version of the Blend SDK, and is not supported in a Windows Presentation Framework 8 project.

Blend gives
Unable to cast object of type 'Galasoft.MvvmLight.Command.EventToCommand' to type 'System.Windows.Interactivity.TriggerAction'

Some of the errors come and go but it never seems to build correctly or run.

Posted sample solution here in case I'm doing something wrong.

Any help is appreciated.
Feb 9, 2013 at 5:08 PM

I just updated the NuGet package to which contains a fix. The problem was a mis-match between the referenced interactivity.dll in the WP75 dll and the one referenced by the project (wp8).

I've now created a WP8 platform dll that references the correct interactivity.dll.

When you update, you'll have to update the assembly name from WP75 to WP8, but I was able to see it working in your sample project with the fix. When I click down in the white rect, I saw a command called.

Please let me know if that works for you.
Feb 10, 2013 at 3:51 AM
Looks like it is working in VS and Blend. Thanks. Appreciate the quick response.
Apr 5, 2014 at 1:53 AM
It seems Install-Package Portable.MvvmLightLibs does not work for a visual C++ project. It just works for C#. Is that right? IF so, when will it be available for C++?

This is the error code:

PM> Install-Package Portable.MvvmLightLibs
Installing 'Portable.MvvmLightLibs'.
You are downloading Portable.MvvmLightLibs from Laurent Bugnion (GalaSoft), onovotny, the license agreement to which is available at Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Portable.MvvmLightLibs'.
Adding 'Portable.MvvmLightLibs' to App3.
Uninstalling 'Portable.MvvmLightLibs'.
Successfully uninstalled 'Portable.MvvmLightLibs'.
Install failed. Rolling back...
Install-Package : Could not install package 'Portable.MvvmLightLibs'. You are trying to
install this package into a project that targets 'Native,Version=v0.0', but the package does not
contain any assembly references or content files that are compatible with that framework. For
more information, contact the package author.
At line:1 char:1
  • Install-Package Portable.MvvmLightLibs
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPack
May 11, 2014 at 5:30 PM

At this point I have no plans to release a C++ version.