He he I start to sound like Microsoft… Anyway… I just released a service pack (SP1) for MVVM Light Toolkit V3.
Well mostly because I worked a bit more with the Windows Phone 7 tools that were released at MIX0, and I noticed a few things that could be better in the Windows Phone 7 template. Also, I only found out at MIX that you can actually install custom project templates for Visual Studio Express. For some reason I thought it was not possible.
The best way to solve these issues is through a service pack, which consists of a few zip files. Simply follow the instructions on the “Installing Manually” page. You can go ahead and overwrite the files that were installed with V3, all the file structure and names are exactly the same.
So what do you get in this service pack that was not already in V3? (for more info about what’s new in V3, check the What’s New page).
- Project and Item templates for Visual Studio 10 Express (phone edition). Unzip these files in your “My Documents” folder, and you can now create a new MVVM Light application in the WinPhone7 version of Visual Studio 2010 Express.
- Signed assemblies: All the assemblies are now signed, which is a requirement in certain build configurations.
- XML documentation files: Thanks to Matt Casto for pinging me and reminding me that I had forgotten to include them (doh).
- New and improved Windows Phone 7 assemblies and templates: This one deserves its own section (see below).
What was wrong with the old Silverlight 3 assemblies in Windows Phone 7 projects?
It was kind of weird. Functionality wise, it was working just right. However, if you noticed, the EventToCommand behavior was not visible in the Assets tab of Expression Blend, under Behaviors, where it should normally have been.
The reason was that even though the Windows Phone 7 is using Silverlight 3, the System.Windows.Interactivity that Blend was expecting is the version that is normally used in Silverlight 4. Yeah, I know, it’s weird.
This led me to create a specific version of these assemblies for the phone. The assemblies are located into C:\Program Files\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Binaries\WP7. There are 3 DLLs:
- GalaSoft.MvvmLight.WP7.dll with RelayCommand, Messenger and ViewModelBase
- GalaSoft.MvvmLight.Extras.WP7.dll with EventToCommand and DispatcherHelper
- System.Windows.Interactivity.dll which is the same DLL installed in the Blend SDK, and which is needed for the EventToCommand behavior to work.
That’s all! Download and install the service pack according to the instructions on the Installation page, and create your first MVVM Light application for the phone (a blog post will follow later with more details).
| posted on Saturday, April 03, 2010 7:59 PM