[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].NET Core 3 Support
 [Expand]Common Concepts
 [Collapse]MVVM Framework
  [Expand]View Models
    Language Specification
   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]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)


DXBinding is a MarkupExtension descendant that extends the standard WPF binding mechanism. With DXBinding, you can write conversion functions right in the DXBinding expression. This topic describes how the DXBinding operates and how to use it.

Expanded How DXBinding Operates

The DXBinding provides two properties: Expr and BackExpr. The first property specifies the straight conversion function. The second property specifies the back conversion function. Each property is specified with using a special language that is described in the following topic: Language Specification.

The DXBinding uses the standard binding mechanism. If there is only one property in the DXBinding's expression, the DXBinding creates a one standard binding. If there are several properties, it creates the standard MultiBinding.

If there are no parameters in the DXBinding expression; the DXBinding calculates the result of the defined expression and sets this calculated value to the Binding.Source property.

When there are function invocations in the DXBinding's expression, the standard binding is created only for the part of the defined expression that ends on the first method.

The function arguments used in the DXBinding's expression are also used in standard binding.

Expanded Relative Source in DXBinding

There are some reserved words supported by the DXBinding's language. These words specify locations relative to the position of the binding target.

  • @s, @Self
  • @p, @TemplatedParent
  • @e, @ElementName
  • @r, @StaticResource
  • @a, @FindAncestor
  • @c, @DataContext
  • @Reference

All items from the above list are described in the Language Specification topic in the Special Words section.

Expanded Two-Way Binding Mode

The DXBinding supports the Mode property in the same way as standard binding does.

The DXBinding.Expr property value can be simple or complex. If the DXBinding creates only one standard binding without any converter – this is simple DXBinding.

The simple DXBinding allows you to use the TwoWay or OneWayToSource binding mode without any additional customizations.

If the DXBinding creates several bindings or it is necessary to generate a converter, then the binding is complex. In this case, it is necessary to specify the DXBinding.BackExpr property that controls the back-conversion mechanism.

The @v or @value words are reserved and used only in the BackExpr expression. See the Special Words section in the Language Specification topic for more details.


The BackExpr property supports the @v or @value reserved words only.

The BackExpr property does not support binding to individual collection items accessed via index notation.

The BackExpr property does not support calling methods from DataContext. This limitation occurs because DataContext is not accessible in the ConvertBack method.

If there are several binding operands in the DXBinding.Expr expression, you can specify a set of assignments in the DXBinding.BackExpr expression.

Expanded Custom Converter

The DXBinding supports the Converter (of the IValueConverter type), ConverterParameter, and ConverterCulture properties.

In straight conversion, the DXBinding resolves the input expression and passes the calculated value to the custom converter, i.e., the converter is called at the end of the conversion.

In back conversion, the converter is called before resolving the BackExpr expression.

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