Saturday, January 22, 2011

Cinch and snippets love

Cinch comes with an awesome set of code snippets you can download here (from the cinch codeplex project page).

Installation
To install them just copy the .snippet files from the zip you downloaded to one of the following:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#
C:\Program Files\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#

This is the default location for VS 2010 snippets as viewed from Tools > Code Snippets Manager > My Code Snippets.

You do not need to restart visual studio 2010 for these snippets to become effective.

Usage
In case you are unfamiliar with snippets usage. Just type in cinch and you get this:
press tab again and you get : 


Press a number for a particular snippet and press tab again. You should get the code expanded.
Some code snippets contain code that you need to copy into the constructor for your ViewModel.



Enjoy!