What Is Cinch?

Cinch is a MVVM framework that exposes a number of helper classes to allow the developer to quickly get to grips with creating scalable testable MVVM frameworks as quickly as possible.

Testing was of paramount importance, and Cinch has had this issue in mind from the very beginning, as such you should find it very easy to unit test your code when using Cinch.

Cinch has 2 active releases
  1. Cinch V1 : WPF Only
  2. Cinch V2 : Which is WPF and Silverlight (4.0 or above)
Here is a list of features that Cinch provides

Cinch is not meant for creating modular UIs, like PRISM, but it does offer a great many other features that are comparable with PRISM such as

PRISM EventAggregator == Cinch Mediator
PRISM UI Service location == Cinch UI Services

And to some extent PRISM Regions == Cinch Workspaces, though I have to say PRISM regions are excellent, however with Cinch V2 you can also use PRISM v4 (which is MEF based) regions/modules with ease. So you can have your cake and eat it too.

Cinch V1

Cinch V1 is a VS2008 solution which only supported WPF, and was aimed at doing MVVM in a ViewModel 1st approach here is a diagram that may help to cement the list above:


And here is a screen shot of it the demo app that went with Cinch V1
Where it used EntityFramework to use with a simple search type UI, and it demonstrates validation/editing of object, cancelling edits, messaging using the Mediator



Cinch originally started as a codeproject atricle, and people asked me to move the code to codeplex, which I did, but all the documentation is available on codeproject and that should be used as main source of information regarding Cinch.

I will maintain a set of links here, which point to codeproject.

Cinch V1 article links are as follows:
  1. A discussion of what would be included in Cinch (much the same as the list above)
  2. A discussion of attached behaviours/attached commands/modes/weak events/mediator usage
  3. A discussion of UI services/threading helpers/Menus the MVVM way/closeable tabs the MVVM way
  4. A discussion of how to develop models/ViewModels using Cinch
  5. A discussion of how to unit test using Cinch
  6. A discussion on the Cinch demo

Cinch V2

Cinch V2 is a VS2010 solution which supports WPF/Silverlight 4, and was aimed at doing MVVM in a View 1st using design time service which would provide design time data to Blend. It uses Managed Extensibility framework to do all this.
Here are some screen shots of the Cinch V2 demo apps: This is the architecural image for Cinch V2 WPF

And here it is in Blend, note that design time data


Cinch V2 SilverlightDemo
This is the architecural image for Cinch V2 Silverlight






Cinch V2 article links are as follows:
  1. Discussed the use of MEF and the MefedMVVM library within CinchV2
  2. Discussed the WPF/SL and common services within CinchV2
  3. Discussed the new features of Cinch V2 that were not in Cinch V1
  4. A Deep Dive Into What Has Changed/What Has Stayed The Same
  5. Disecting The WPF Demo App
  6. Disecting The SL4 Demo App
Community based articles:
How to convert a Silverlight Navigation Application to use MVVM using Cinch V2. Which basically shows you how to use the Silverlight inbuilt navigation features with CinchV2 for Silverlight

There is also another very nice demo/project that utilises Cinch V2 for WPF available at SQL Server Companion WPF which basically looks like this




Cinch V2 Working With PRISM v4

For those of you that love PRISM, and want to use PRISM things like Regions/Modules, good news CinchV2 works seamlessly with PRISM 4, you can read all about it using this article
I have created 2 demos to showcase this in the article and here are some screen shots of them in all their glory

Demo 1 : Shows how to use a custom region adaptor (but does not use regions), and also uses some CinchV2 goodies



Demo 2 : Shows how to use a regions/modules, and also uses some CinchV2 goodies





Cinch ViewModel Code Generator

Cinch V1 and Cinch V2 development can be greatly sped up by using the code generator that comes with Cinch. It is actually available within the Cinch V1 solution, but works for both Cinch V1 and Cinch V2 ViewModels
There is an article describing how to use the code generator over at codeproject which you can read using the following link And here is what it looks like when it is running







Cinch Code Snippets

There are a number of community contributed code snippets, which I have checked and these are available from the Cinch patch list using this url: Whats inside:
  1. Cinch: EditableValidatingObject overrides
  2. Cinch: INotifyPropertyChanged for reference type
  3. Cinch: INotifyPropertyChanged for value type
  4. Cinch: INotifyPropertyChanged + DataWrapper for reference type
  5. Cinch: INotifyPropertyChanged + DataWrapper for value type
  6. Cinch: INotifyPropertyChanged for collections
  7. Cinch: INotifyPropertyChanged
  8. Cinch: Command
  9. Cinch: Background worker
  10. Cinch: ViewMode




This WikiPage was created with Codeplex WikiEditor