[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]MVVM Framework
  [Expand]ViewModels
  [Expand]Commands
  [Expand]Behaviors
  [Expand]Services
  [Expand]DXBinding
  [Expand]MIF
   Converters
   ViewLocator
   Messenger
   Data Annotation Attributes
   LayoutTreeHelper
   Weak Event
 [Expand]Controls and Libraries
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

MVVM Framework

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.

Tip

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.

  • ViewModels

    Base classes that simplify implementing bindable properties, validation, commands, consuming services, and interaction between View Models.

  • Commands

    Commands allow you to define actions in a View Model and then bind to them in a View.

  • Behaviors

    Behaviors allow you to extend visual controls' functionality, and adhere to the MVVM pattern.

  • Services

    Services are defined in Views. You can use their functionality in View Models.

  • DXBinding

    The Binding mechanism can be extended with the DXBinding, DXCommand, and DXEvent markup extensions.

  • MIF

    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. 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 logical and visual trees' elements.
  • 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.

Is this topic helpful?​​​​​​​