A Hello World template of a WPF application using MVVM

Hey all,

I created an MVVM project and then saved it as a template.  This way when I create new projects, I can simple choose MVVM Base and save a ton of time.

You can use my template if you want.  You can download it here: MVVM Base.zip

How to add the MVVM Base template to your Visual Studio

If you want this to be available as a new project type in you Visual Studio install, follow these steps.

  1. Download this template: MVVM Base.zip
  2. Place this zip file into the %USERPROFILE%\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#.
  3. Create a new Visual Studio Project and choose MVVM Base from the list of C# projects.


  1. Vijay says:


    This code will not compile. You have used $ sign which will not be acceptable at compile time.Also,in XAML it is not referring a correct namespace .

  2. Hi there! Simple MVVM Toolkit works great with WPF. But as you know, RIA Services does not. What you will need to do is create a WPF app using the tookilt project template for WPF (it's under Windows, Mvvm category when creating a new project in Visual Studio). Then add a WCF service to the solution and use that to communicate with your database. The best example of how to do this is Part 1 and Part 2 under Simple-Mvvm-Main folder in the samples folder (you will need to unzip the samples zip file). These are Silverlight projects, but they use WCF instead of RIA services, so they are a good guide to follow just use WPF instead of Silverlight and you should be fine.

  3. Candy says:

    Today, while I was at work, my sister stole my apple ipad and tested to see if it can survive a 30 foot drop, just so she can be a youtube sensation.
    My apple ipad is now destroyed and she has 83 views.
    I know this is completely off topic but I had to share it with someone!

  4. Ziel says:

    Works fine and helped me a lot !

    But on HelloWordViewModel.cs replace NotifyPropertyChanged("HelloWorld"); by NotifyPropertyChanged("Text"); to avoid an error

  5. Lefty Dizz says:

    your zip file wont compile. Your code has no comments. No idea what it was supposed to do..

    Fix it. Try adding a comment, say, on every line?

  6. [...] A Hello World template of a WPF application using MVVM [...]

  7. tanth says:

    this is what I have been looking for, thanks.

Leave a Reply

How to post code in comments?