[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
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]MVVM Framework
    Getting Started
   [Expand]Predefined Set
    How to: Create a Custom Behavior
   Data Annotation Attributes
   Weak Event
 [Expand]Controls and Libraries
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Getting Started

The Behavior mechanism extends the capabilities of visual controls and adheres to the MVVM pattern. You can implement missing functionality with a custom Behavior and begin using it any place in your application without code-behind and duplicated code.

Expanded Regular approach to define Behaviors

The DevExpress.Mvvm.UI.Interactivity.Interaction class implements a Behaviors attached property. This property is read-only and contains a collection of Behaviors. To use a Behavior, place it in this collection in XAML.

Behaviors can provide dependency properties, which you can set or bind. For instance:

Expanded How to define and use Behaviors in styles

The DevExpress.Mvvm.UI.Interactivity.Interaction class implements a BehaviorsTemplate attached property. This property can be used to apply Behaviors in a style. For instance:

If it is necessary to define more than one Behavior, you can place behaviors on the ItemsControl element, instead of the ContentControl.

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