views:

81

answers:

1

Hi,

I've downloaded the mvvm light toolkit source 4157, and try to use the EventToCommand.SL sample. It works well in Visual Studio 2010, if I use the silverlight 3 framework.

But if I select the silverlight 4 version (EventToCommand.SL project properties), nothing appears : the ViewModel method associated with the Command property is never executed. The setter of the Command property of the EventToCommmand class is not reached !

Is there something that I missed ? Or is there a workaround ?

Thanks

A: 

By saying "EventToCommand.SL project properties", do you mean that you're Right-Clicking on the EventToCommand.SL project, and changing the version of the framework that the sample runs under? If so, it's probably a SL3 vs. SL4 reference error. There are 5 sets of binaries that ship with MVVM Light - SL3, SL4, WP7 and WPF35sp1 and WPF4. Make sure that you're sample is referencing the SL4 binaries instead of the SL3 ones.

Chris Koenig
Hi Chris, and thanks you for your answer,Yes, I've changed the framework version of the EventCommand.SL project. This project are not using the mvvmlight binaries, but the mvvmlight projects (GalaSoft.MvvmLight and GalaSoft.MvvmLight.Extras) so I've changed the framework version in these projects too. Do you think there is another source code of the mvvm-light which can be used with Silverlight 4 ? Thanks
borg777
It would an interesting test for you to give it a try using the MVVM Light binaries instead of the source code. I haven't been using the source for anything - just the binaries, so I'm not sure what potholes there might be along that route. I'll poke around and try some things to see what I can learn...
Chris Koenig
You are right : when I replace mvvm light projects by binaries, it works well. It seems that source code have not been updated since Silverlight 3... So pity : I like to see the implementation of a open-source before using it
borg777