[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Collapse]Build an Application
  [Expand]Choose Application UI
  [Expand]Printing and Exporting
  [Collapse]WinForms MVVM
   [Expand]Design-time Support
  [Expand]Right-to-Left Layout
   Redistribution and Deployment
   How to: Perform Actions On Application Startup
 [Expand]Controls and Libraries
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

WinForms MVVM

The DevExpress MVVM Framework allows you to utilize the Model-View-ViewModel design pattern in WinForms applications. The documentation on this framework consists of the following chapters.

  • Tutorials

    Follow step-by-step tutorials to create a sample data-aware 'Expenses' application.

  • Concepts

    Contains in-depth information on key MVVM concepts including bindable properties, commands, UI triggers and value converters.

  • Design-time Support

    Learn about the DevExpress MVVM Framework's design-time features designed to accelerate application development.

Expanded What is MVVM and Why Should You Use It?

Designed for WPF development, Model-View-ViewModel (MVVM) is an architectural design pattern that separates your application into three layers that make up the pattern's title.

  • Model - defines the data and your business logic.
  • View - specifies the UI, including all visual elements (buttons, labels, editors, etc.) bound to properties and commands in the ViewModel.
  • ViewModel - connects Model and View. This layer is an abstraction of the View that exposes public properties and commands used to bind your data to GUI elements and manage this data.

The diagram below illustrates these layers and their ways of communication.

This separation 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 to learn more about this pattern and the benefits it provides.

Expanded MVVM in WinForms Apps: Issues and Options

The WinForms platform, without a third party MVVM Framework, lacks such essentials as agile data bindings or bindable commands. To follow MVVM principles, you would have to manually implement those features, thus creating an additional layer - Presenter. Typically, this layer includes UserControls and their code-behind, methods that customize View elements, event handlers and bindings.

The DevExpress MVVM Framework provides built-in support for all those features thus enabling pure MVVM development with WinForms without the need for that additional workload. As an added benefit, it integrates well with DevExpress WinForms UI Controls that you are already using in your applications.

Here are a few of the supported features and benefits.

  • flexible data bindings
  • commands and command bindings
  • behaviors and services
  • an advanced way to implement notifications and commands
  • the MVVM Context component that governs everything from creating ViewModels to registrating DevExpress services
  • simple (POCO) classes support
  • rich interoperability with other DevExpress WinForms controls
  • Template Gallery templates, created specifically for MVVM apps
  • fluent API and Data Annotation Attributes support
  • various design time capabilities

Expanded See Also

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