WPF MVVM project template

Free

Creates a WPF client application with MVVM pattern project structure.

(4) Review
Visual Studio
2012, 2010
Download (15,739)
2/28/2013
4.1
E-mail Twitter del.icio.us Digg Facebook
Add To Favorites
Description
Reviews (4)
Q and A (3)
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


  • Error in template
    2 Posts | Last Post May 26, 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.
  • 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