Setting up a project to use cinch

Get the latest build

Extremely simple really. Just download the latest version of Cinch (including source) from here :
After you extract it navigate to e.g.: cinch-55703\cinch\V2 (VS2010 WPF and SL)
Extract the "" file. 
Navigate to : WPF_Demo\CinchV2DemoWPF\Lib  . These are your pre built libraries.

Setup the project

Now create a new WPF Project. 
Copy and reference all the LIB files in your project. 
Add a reference to the MEF data composition library : "System.ComponentModel.Composition.dll" 

Using a View Model Locator

ViewModel File

At the top of your view model add the following using statements : 

using System.ComponentModel.Composition;
using Cinch;
using MEFedMVVM.ViewModelLocator;
using MEFedMVVM.Common;

Decorate your ViewModel with the correct name: 

class MainWindowViewModel : ViewModelBase

XAML View File

Set the data context to the correct ViewModel instance for your View: 


All set. Enjoy!

PS: Important Notes: 

Means that only a single instance is always used for whenever you import it to a view. 
Will create a new instance of the ViewModel for each view instance.  This is standard MEF :)