.NET Zone is brought to you in partnership with:

I’ve been a Windows developer since 3.0 and caught the Visual Basic wave early with v1. I’ve released a “production” application in every version of VB since then (except VB for DOS). Focusing on enterprise, line-of-business development I’ve built Call Center Applications, Mortgage finance systems, Customer Relationship Management tools and more recently I’ve been in the Litigation Support/Electronic Data Discovery/Electronically Stored Information space. Greg is a DZone MVB and is not an employee of DZone and has posted 475 posts at DZone. You can read more from them at their website. View Full User Profile

Introducing the WPF Application Framework

05.04.2012
| 4562 views |
  • submit to reddit

CodePlex - WPF Application Framework (WAF)

"The WPF Application Framework (WAF) is a lightweight Framework that helps you to create well structured WPF Applications. It supports you in applying a Layered Architecture and the Model-View-ViewModel (aka MVVM, M-V-VM, PresentationModel) pattern.

...

image

  • WPF Application Framework (WAF)
    • ViewModel: Contains types that help you to implement the Model-View-ViewModel Pattern.
    • DataModel: A base class supports you in applying the DataModel-View-ViewModel Pattern.
    • DelegateCommand: The DelegateCommand allows you to handle WPF commands in other classes than the View.
    • INotifyPropertyChanged: The base classes implement the INotifyPropertyChanged interface. The implementation checks the property name in DEBUG mode.
    • WeakEvent: First class support for the WPF WeakEvent Patterns which helps you to avoid memory leaks.
    • Validation: The DataErrorInfoSupport class brings the IDataErrorInfo interface with the DataAnnotations validation framework together.
    • ConverterCollection: This collection is able to keep the DataModels synchronized with an ObservableCollection of Models.
    • Services: Provides services to show a message or the open/save file dialog to the user.
    • Recent Files: The RecentFileList class provides the logic for a recent file list that can be loaded and stored in the application settings.
  • Unit Testing Extensions
    • Exceptions: The ExpectedException method test if an action results in a specified exception.
    • PropertyChanged: Provides a helper method to test if a property changed event is raised when a specific action is executed.
    • CanExecuteChangedEvent: A helper method to test if a CanExecute changed event is raised when a specific action is executed.
  • Samples
    • Email Client: A simple Email Client application that shows how to use the M-V-VM Pattern in a wizard oriented application.
    • Writer: A word processing application which uses a “tabbed MDI” as user interface. This sample shows how to use the Message and FileDialog service.
    • Book Library: Shows how to use the Entity Framework and Validation together with the MVVM pattern.
    • Localization: Demonstrates a simple way to localize a WPF application.

..."

While there's a number of MVVM frameworks available, I thought this one interesting and one I'd like to look deeper into. It's funny what grabs you when you scan a page. In this case, it was the Recent Files class. I hate re-inventing MRU lists (having just done one recently)

Published at DZone with permission of Greg Duncan, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)