- 3 minutes to read
The DevExpress MVVM Framework allows you to utilize the Model-View-ViewModel design pattern in WPF applications.
The Model-View-ViewModel (MVVM) architectural design pattern divides your application into three layers.
- Model - defines the data and business logic.
- View - specifies the UI, including all visual elements (buttons, labels, editors, etc.) bound to properties and commands in the ViewModel.
- ViewModel - contains the logic that connects the View and the Model.
The diagram below illustrates these layers and how they interact.
The MVVM pattern grants you multiple benefits, such as a more independent development process for both developers and designers, easier code testing or simpler UI redesigning. Refer to this MSDN article for more information about this pattern.
You can use the DevExpress MVVM Framework and DevExpress WPF Controls separately. The DevExpress WPF Controls can be used with any MVVM framework.
This documentation section contains the following topics that describe features of the DevExpress MVVM Framework.
Base classes that simplify implementing bindable properties, validation, commands, consuming services, and interaction between View Models.
Commands allow you to define actions in a View Model and then bind to them in a View.
Behaviors allow you to extend the functionality of visual controls, and adhere to the MVVM pattern.
Services are defined in Views. You can use their functionality in View Models.
Module Injection Framework (MIF) is a set of classes that allow you to organize an MVVM application.
The DevExpress MVVM Framework provides the following components to simplify application development:
- Converters. A set of extended value converters that allow you to perform conversions between different types and between values of the same type.
- ViewLocator. Provides a composition mechanism that enables you to locate Views by their type names.
- Messenger. Allows you to implement a message exchange between modules.
- Data Annotation Attributes Support. Data annotation attributes are used to customize data classes, to specify how data is displayed from a data source, define validation rules, and set relationships between data classes.
- LayoutTreeHelper. Provides an API for searching nodes and iterating through elements of logical and visual trees.
- Weak Event. Allows you to declare events that do not need to be unregistered and do not cause memory leaks. These events are used to implement the interaction between different application modules (for example, data services and view models) and objects that exist throughout the application’s lifecycle.