I am currently working with the Microsoft MVVM template and find the lack of detailed examples frustrating. The included ContactBook example shows very little Command handling and the only other example I've found is from an MSDN Magazine article where the concepts are similar but uses a slightly different approach and still lack in any complexity. Are there any decent MVVM examples that at least show basic CRUD operations and dialog/content switching?
Everyone's suggestions were really useful and I will start compiling a list of good resources
Frameworks/Templates
Useful Articles
- WPF Apps With The Model-View-ViewModel Design Pattern
- Data Validation in .NET 3.5
- Using a ViewModel to Provide Meaningful Validation Error Messages
- Action based ViewModel and Model validation
- Dialogs
- Command Bindings in MVVM
- More than just MVC for WPF
- MVVM + Mediator Example Application
Screencasts
Additional Libraries
- WPF Disciples' improved Mediator Pattern implementation(I highly recommend this for applications that have more complex navigation)
- MVVM Light Toolkit Messenger
Found this one useful. Has code too.
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
The sample project in the Cinch framework shows basic CRUD and navigation tools. It's a fairly good example of using MVVM, and includes a multi-part article explaining its usage and motivations.
Here I am adding link of a WPF(Inventory Management App) application which using MVVM architecture designed by me .
Its UI is awesome. https://github.com/shivam01990/InventoryManagement
Have you looked at Caliburn? The ContactManager sample has a lot of good stuff in it. The generic WPF samples also provide a good overview of commands. The documentation is fairly good and the forums are active. Recommended!
I also shared in your frustration. I'm writing an application and I had these 3 requirements:
All I found were bits and pieces, so I just started writing it the best I could. After I got into it a bit, I realized there might be other people (like yourself) who could use a reference application, so I refactored the generic stuff out into a WPF/MVVM application framework and released it under the LGPL. I named it SoapBox Core. If you go to the downloads page, you'll see it comes with a small demo application, and the source code for that demo application is also available for download. Hope you find that helpful. Also, email me at scott {at} soapboxautomation.com if you want more info.
EDIT: Also posted a CodeProject article explaining how it works.
I have written a simple MVVM example from scratch on code project here is the link MVVM WPF step by step. It starts from a simple 3 layer architecture and graduates you to use some framework like PRISM.