Why a private version of System.Windows.Interactivity?

Aug 4, 2010 at 3:47 PM

Why does MVVM Light include it's own version of System.Windows.Interactivity?  Will it work with the existing one from Microsoft?  (I'm using VS2010, Blend 4, and creating SL4 apps.)  This just seems ... weird.

Coordinator
Aug 5, 2010 at 2:09 AM

Hi,

This is a very good question, and I was wondering when someone would ask it :)

There are two reasons:

1) The Sys.Win.Interactivity DLL does not come with the .NET framework or Silverlight SDK, but with the Blend SDK. This is an additional install for just one DLL. If you do have Blend installed, you won't notice it, but the users who don't have Blend but still want to use EventToCommand are spared the need to download and install the Blend SDK this way.

2) There are multiple versions of this DLL, and all of them are super incompatible with each other. For example, using the Sys.Win.Interactivity DLL from SL3 into an SL4 project does not work. Using WP7 in a WPF project obviously doesn't work, etc. Unfortunately, all these versions are all named the same, which is confusing. By distributing this DLL with the MVVM Light framework, I avoid confusion.

That said, this is the same DLL that comes with the Blend SDK (or the Blend app), so feel free to use yours if you prefer... just make sure to use the correct version ;)

Cheers,

Laurent