WPF MVVM project template

Free

Creates a WPF client application with MVVM pattern project structure.

(4) Review
Visual Studio
2012, 2010
Download (29,350)
2/28/2013
4.1
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (4)
Q and A (4)
Sign in to write a review
Sort by:

by yrsgfckujhgljhkuhikj | May 17 2013

noooooooooooo

by ShloEmi | April 07 2013

Same as 'Amir Liberman' - Great job!
Makes my life easier every time I use it.

by Amir Liberman | February 07 2013

Very useful. A great way to start an MVVM project.

by MaJiXiang | August 17 2012

Sign in to start a discussion


  • Minor bug
    1 Posts | Last post July 30, 2013
    • Nothing functional, but GUI says age > 16, and you call it with > 18.
      Great besides.
      
      (couldn't find your contact or how to post images, so here are links :)
      https://www.dropbox.com/s/0fuac020fvit9rl/2013-07-30%2011_48_39-%20mvvm%20project%20template%202.png
      https://www.dropbox.com/s/5p77547dgztpep1/2013-07-30%2011_52_02-%20mvvm%20project%20template%201.png
  • Error in template
    3 Posts | Last post July 01, 2013
    • I just downloaded the template and installed it in vs2010 and vs2012.
      I then created a new project based on the template .  The files it created have an error.  I am unable to view the mainwindows in design mode.
      
      I've added no code of my own whatsoever.
      
      System.NullReferenceException
      Object reference not set to an instance of an object.
         at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
         at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
         at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
    • hi,
      must say i have no idea what this error is, never encountered it before.
      i was not able to reproduce what you are describing, in both VS2010/12, i got no errors and the design view looks fine.
      
      this does not seem to be a problem with my extension.
      try googling for it.
    • Changing the project to target 4.5 Full (rather than the 4.5 Client Profile) worked for me.  Note that I had to build AND restart Visual Studio for the error to clear.  Hope this works for you.
  • RaiseCanExecuteChanged never called?
    3 Posts | Last post February 28, 2013
    • I made a new project with this template.  I then created a checkbox and bound it to a bool in the MainWindowViewModel:  
      private bool _CanRefreshDate;
              public bool CanRefreshDate
              {
                  get { return _CanRefreshDate; }
                  set
                  {
                      if (_CanRefreshDate != value)
                      {
                          _CanRefreshDate = value;
                          RaisePropertyChanged(() => CanRefreshDate);
                      }
                  }
              }
      
      I modified the ICommand for the Refresh button:
      
      public ICommand RefreshDateCommand { get { return new DelegateCommand(OnRefreshDate, CanExecuteRefreshDate); } }
      
      and added the method:
      
      private bool CanExecuteRefreshDate()
              {
                  return CanRefreshDate;
              }
      
      Why doesn't this ever disable/enable the Refresh button like I expect it should?  It seems the RaiseCanExecuteChanged() in DelegateCommand.cs never gets fired.
    • Note:  When I created the project in VS2010, I did:  Online Templates->WPF->WPF MVVM project template.  Not the WPF MVVM Application" this site says.  However, the "More Information" link takes me to this page.
    • Thanks for the catch. i have fixed this in V4.1
      i had no handling for CanExecuteChanged in the DelegateCommand.
  • Errors
    2 Posts | Last post October 22, 2012
    • I may be missing something really obvious, but when I load this template, there are a bunch of errors even after cleaning? is there something specific I need to do on installation or opening?
      
    • what version of VS you have? it works on 2010.
      what version of WPF you have? it works on 4.0