WPF : Some Good Cinch News

I have now included some code snippets (C# only sorry) to help you develop ViewModels using my Cinch MVVM Framework.

I did not write these code snippets myself, one of the Cinch MVVM Framework users, a chap called Manuvdp uploaded them as a patch to the Cinch MVVM Framework codeplex site.

I have checked that I am happy with them before I included them, and I am. So what I have done is included Manuvdp original code snippets and also created a VSI Installer for them.

So after you have installed the snippets using the VSI, and you are doing a Cinch MVVM Framework app and type in “Cinch”, here is what you get:

snips

Neato.

In case any of you are wondering how to create a VSI installer for the code snippets here is a step by step guide.

Step1

Store your snippets in a folder somewhere (I called this CodeSnippets)

Step2

Create a new XML File in Visual Studio in the same folder as all your code snippets. I name this file CinchSnippets.xml. This xml file will be the manifest file.

Step3

Rename CinchSnippets.xml to CinchSnippets.vscontent

Step4

I edited the CinchSnippets.vscontent to include each of the snippets I wanted to be part of the VSI installer. Shown below is an example of what this xxxxx.vscontent manifest file should look like:

<?xml version="1.0" encoding="UTF-8"?>
<VSContent
  xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
  <Content>
    <FileName>Cinch0.snippet</FileName>
    <DisplayName>Cinch : Code snippet for a
    EditableValidatingObject overrides</DisplayName>
    <Description>Code snippet for a
    EditableValidatingObject overrides
    </Description>
    <FileContentType>Code Snippet</FileContentType>
    <ContentVersion>1.0</ContentVersion>
    <Attributes>
      <Attribute name="lang" value="csharp"></Attribute>
    </Attributes>
  </Content>
  <Content>
    <FileName>CinchBGWorker.snippet</FileName>
    <DisplayName>Cinch : Code snippet for a
    Background worker</DisplayName>
    <Description>
      Code snippet for a Background worker
    </Description>
    <FileContentType>Code Snippet</FileContentType>
    <ContentVersion>1.0</ContentVersion>
    <Attributes>
      <Attribute name="lang" value="csharp"></Attribute>
    </Attributes>
  </Content>
</VSContent>

This is for 2 snippets, which you can see in the Content elements. If you need more, just add more Content elements.

Step5

I then zipped all the xxxx.snippet files and the xxxxx.vscontent file (CinchSnippets.vscontent in my case) into a new zip file, say CinchCodeSnippets.zip

Step6

I then renamed the zip file CinchCodeSnippets.zip –> CinchCodeSnippets.vsi

Step7

You can then run  the VSI installer by double clicking on the newly created CinchCodeSnippets.vsi

 

NOTE :I Would not download the entire Cinch MVVM Framework again, as I am still working on one improvement which I hope to have resolved very soon. You should however be able to grab all the items new CodeSnippets folder, and I will make an announcement on this blog when I have made the improvement or not. Depends on how hairy it gets, either way I will let you all know.

Enjoy

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment: