MVVMHelpers.Metro updated

The Metro version of MVVMHelpers was updated yesterday with some key new features, one of them is some built-in state management for process lifetime and navigation. This is done through two interfaces - IPageNavigator and IStateManager. You can use them independently, or together. By default, if you don't assign one, the PageNavigator service will internally create a StateManager to store off page navigation state. You can supply your own IStateManager implementation by either overriding the … [Read more...]

DevWeek slides and samples

Whew!  It was an exhausting but fun week in London where I presented a bunch of Windows 8 material - thanks to everyone who attended!  I had far more sessions than I had prepared for due to a colleague hurting his back (the worst pain ever, I hope you recover soon Dave!) but I hope they were informative even with a decided lack of preparedness.. As promised, here are the slides and samples -- thanks to Dave Wheeler for some of the materials, and thanks to Developmentor for letting me use some … [Read more...]

Using behaviors with ElementName bindings in Windows 8 Metro

I got an email yesterday from a developer who was trying to use MVVMHelpers and the new System.Windows.Interactivity support for Windows 8 and was having trouble. Specifically, he was trying to do this: The idea was to have a command get invoked when an item is tapped in the ListView - passing the selected item as the parameter to the command. He was always getting null in his command handler. There are actually two issues with this snippet, one is in the setup of the ListView itself and the … [Read more...]

Problem with MEF in Windows 8 style apps (Metro)

I noticed when I use NuGet to add MVVMHelpers, the app refuses to start.  I get the following error: "Unable to activate Windows Store app xxx, The activation request failed with error 'The app didn't start'." Wow.  Totally unhelpful - even chasing down the event logs didn't really help much other than to show me a lot of weird errors get logged from Metro apps about tiles! After experimenting a bit, it turns out the fix is quite simple.  MVVMHelpers relies on MEF for composition and … [Read more...]

MVVMHelpers for Windows 8 Metro RTM released

I have updated the MVVM Helpers for Metro to the RTM Windows 8 build.  If you've been following the source changes, you might notice I've included full support for Blend Behaviors - even though Blend itself doesn't support them!  To accomplish this, I ported the System.Windows.Interactivity.dll to Metro and include it as part of the package - I'll remove this once Blend supports behaviors officially. I've also ported the most useful of the Blend behaviors and behaviors from the WPF MVVMHelpers. … [Read more...]

MVVMHelpers for Windows 8 Metro

I've been doing some Windows 8 Metro programming lately and to help with building more testable applications have ported the MVVMHelpers ( over to Metro/.NET 4.5.  This post is intended to introduce the functionality and show it off a little. First, we'll create a new Metro-based Blank application using Visual Studio 2012: Next, let's add references to the MVVM library - we'll use NuGet, but you can also downloads the source or binaries from Codeplex.  Make sure you … [Read more...]

Dynamic type binding in WPF 4.5

One of the new features in WPF 4.5 is data-binding support for ICustomTypeProvider. This enables adding dynamic properties to types where the actual shape of the type is not known until runtime. For example, where the data itself is being retrieved from a web service (JSON) or from an XML definition. This feature was also added in Silverlight 5 so we have feature parity here (almost). ICustomTypeProvider allows you to define the bindable properties at runtime with full type knowledge … [Read more...]

INotifyPropertyChanged in .NET 4.5

Implementing INotifyPropertyChanged in your XAML-based application has always been a point of hot debate. To date there are a variety of techniques - from the original (and fastest) "magic" string indicating the property name to the much slower, but compiler-checked Lambda expression tree implementation which provides refactoring safety. Both styles are included in my MVVM library ( Trying to keep the performance of a raw string-based approach, but get the … [Read more...]

.NET Bio is now available via NuGet!

For those of you who have always wanted to write a cool bioinformatics analysis program using .NET I have some great news!  It’s now even easier to add support for the open-source .NET Bio project ( If you aren’t familiar with NuGet, it’s a package repository which allows you to add dependencies to a Visual Studio project directly from an online source (vs. just what you have on your machine) and keep them up to date as they change.  Check out … [Read more...]

Sequence Dot Plots part II

In the last post, we built a simple WPF application to display a dot plot – this is a graphical representation to compare two streams of data against each other to determine similarity.  It is often used in bioinformatics to compare genomic sequences and determine if they are related in some fashion.   Comparing the same sequence against itself (obviously has a high degree of similarity) generated a lot of false positives in our application - Here you can see the white diagonal … [Read more...]