How to close a view in MVVM

Aug 14, 2009 at 12:42 PM

Hi

Does anybody know a best practice to close a view in MVVM pattern keeping a code-behind empty.?

Thanks

Coordinator
Aug 14, 2009 at 12:48 PM

Take a look at this article here, http://blogs.msdn.com/vinsibal/archive/2009/04/10/launching-a-custom-dialog-to-edit-items-in-a-datagrid-with-mvvm.aspx or this one here http://msdn.microsoft.com/en-us/magazine/dd419663.aspx.  That should give you an idea of how to close a view using MVVM.

Oct 5, 2009 at 4:08 PM

An alternative approach is shown in the ViewModel sample of the WPF Application Framework (WAF).