Adapted from relevant xkcd
There are several free frameworks to help develop MVVM applications. All frameworks are different: some are light and easy to use, others have great capabilities for building a flexible application architecture, others solve typical MVVM problems.
Not long ago, we introduced our MVVM framework. Our framework is both light and easy to study. Our MVVM library contains independent parts, which can be used separately. You can enjoy the following features even while using other third party MVVM libraries.
- Avoid manually implementing bindable properties with our POCO mechanism without changing anything in your other modules.
- Easily implement interactions between ViewModels with Messenger.
- Modify the behavior of any visual component – create a Behavior and assign it with an Interaction.
- Use our Services mechanism for finer control of any visual component.
These benefits motivated us to release a free version of the DevExpressMVVM Framework. Our MVVM solution easily integrates with DevExpress components and, in general, with any application.
Free MVVM Framework will be available from NuGet, where anyone can use our solutions as easily as possible. We will make the source code publicly available on GitHub, where you can find sources for our main assemblies along with tests and samples to get up and running.
Little specifics on the work done
The Mvvm library will see a minor name change in the new release. In 14.1 we removed the “Xpf” prefix in the assembly name, so ”DevExpress.Xpf.Mvvm.vXX.Y” is now “DevExpress.Mvvm.vXX.Y”. The prefix “Xpf” was also removed from everyMvvm namespace:
DevExpress.Xpf.Mvvm.[…] -> DevExpress.Mvvm.[…]
DevExpress.Xpf.Mvvm.UI.[…] -> DevExpress.Mvvm.UI.[…]
Why did we do this? XPF is a symbiosis between two specific platforms: WPF and Silverlight. Nearly every one of our WPF components is also available in Silverlight with a similar API. The MVVM library was conceived as a library for WPF and Silverlight. We’ve since adopted our library in other projects. For instance, our new demos feature a common ViewModel in two absolutely different platforms: WinForms and WPF. This code base was built with our MVVM Framework.
Despite these changes affecting nearly every WPF/Silverlight project, there’s no need to fear. The 14.1 Project Converter is aware of these changes, so upgrading an existing project to 14.1 will automatically update references and using statements.
Alongside the Free MVVM framework, we’ve enhanced design time support in MVVM solutions and added some exciting new services.
Design Time improvements
DevExpress components provide powerful customization capabilities in the Visual Studio designer. Instant Layout Assistant extends the standard Toolbox and a Smart Tag panel allows for quickly setting the most important properties of controls, assigning icons, and customizing bindings.
In 14.1, we added the capability to define and customize Mvvm components (attached behaviors, EventToComands, services) directly from the Smart Tag.
New NotificationService
The NotificationService service allows showing Windows 8-style notifications as in the top screenshot.
New TaskbarButtonService and ApplicationJumpListService
These services allows you to customize how your application looks in the Windows 8 taskbar and the functionalities available from there.
Other improvements
We also created several small services and behaviors.
- DispatcherService performs actions in a ViewModel using the Dispatcher.
- FolderBrowserDialogService, OpenFileDialogService, and SaveFileDialogService open file dialogs from a ViewModel.
- WindowService opens a View in a separate window from a ViewModel.
- FocusBehavior provides an easy way to determine which control should be focused on startup.
- ConfirmationBehavior provides a capability to show a message when an end-user performs a certain action.
- AsyncCommand is a command with an asynchronous action. AsyncCommands can be automatically generated from a POCO ViewModel.
Improvements in Scaffolding Wizards
- We added a capability to edit detail collections (when the LookUpEdit is used).
- Automatic change tracking. When an end-user changes some data in a tab, the tab header displays a “*”.
- Added the FilterExpression property to the base class for collection ViewModels. With this feature you can set a filter for any module.