Navigation and Persistence with MVVM in Windows Store Apps take #2

Earlier I posted on an updated version of MVVMHelpers with persistence support (see here). Paulo Quicoli, a long-time MVVMHelpers contributor, sent me a little code and a different way of managing navigation and persistence that he's been using. I thought it was quite elegant and asked if I could include a version in the library, which he graciously agreed to.  The result will be in the next release of the library - but I thought I'd introduce it here. The idea is to use a serializer on the … [Read more...]

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...]

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...]

Unit Testing with services in MVVM Helpers

In the previous post I showed how you can easily replace services within your application to fit whatever your goals are.  This is also a requirement when you would like to unit test your application, but there’s a slightly different twist to it. As a simple example, let’s use the little demo app we built to play with service replacement.  In this case, our CalculatePi method in the MainViewModel ended up with the following code: private void OnCalculatePi() { IMessageVisualizer … [Read more...]

Replacing Services in MVVM Helpers

One of the key features in any good library is to provide a wide set of services for applications to use, but also some level of flexibility to replace those services when the built-in implementation aren’t what is needed. MVVM Helpers provides this capability using the Managed Extensibility Framework (MEF) which is built into .NET 4.0 and provided on for .NET 3.5.  MEF allows you to compose your application dynamically – looking up concrete implementations for … [Read more...]

Using the Message Mediator Service in MVVM Helpers

One of the services exposed in the MVVM Helpers library is a Message Mediator.  This service implements the mediator design pattern which is used to enable objects to talk to each other without having any explicit knowledge of each other.  In this pattern, we use a third-party object (the “mediator”) to negotiate communication between the interested parties. The message mediator is actually part of the JulMar.Core assembly – this is a general .NET assembly that contains useful code, … [Read more...]

MVVM Helpers 2.0 is live

… and available on codeplex in beta form: There are several new features in this release that I've been tinkering with for a while.  First, I now use MEF to link things together.  I waited until .NET 4.0 was released to push this out because MEF is part of the framework now.  If you don't want to take a dependency on it (in 3.5) then please stay with 1.06 which is also available.  Managing Services with the Service Locator pattern + MEF … [Read more...]

MVVM Helpers for .NET 4.0

I have updated MVVM Helpers against the RTM of Visual Studio 2010.  I will be updating the codeplex site ( shortly, but in the meantime, here’s the project template for Visual Studio 2010.  Copy the .zip into your templates directory, mine is located at: C:UsersMarkDocumentsVisual Studio 2010TemplatesProjectTemplatesVisual C# Here’s the file. … [Read more...]

MVVM Helpers has a new home!

I’ve published it to where I’ll continue to maintain and add to it.  Get the latest release from there! … [Read more...]