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.
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.
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?