Skip to main content
A newer version of this page is available. .

DXBinding

Binding Tools

The DevExpress Binding mechanism includes three powerful tools that extend standard WPF bindings.

  • The DXBinding allows you to use expressions inside binding paths.

    IsEnabled="{Binding HasError, Converter={dxmvvm:BooleanNegationConverter}}"
    IsEnabled="{DXBinding '!HasError'}"
    IsEnabled="{DXBinding 'GetHasError(Text)'}"
    
  • With the DXCommand, you can bind a command property and define methods to call right in xaml.

    Command="{DXCommand 'SaveDocument(DocumentName); CloseDocument(DocumentName)'}"
    
  • The DXEvent allows you to bind an event to methods.

    Loaded="{DXEvent InitializeViewModel()}"
    

The Language Specification topic describes the language that is used in the DevExpress binding mechanism.

Declarative Template Selector

The DXDataTemplateSelector is a declarative way to implement DataTemplateSelector.

The DXDataTemplateSelector allows you to define a simple template selection logic in XAML, so you do not need to create a DataTemplateSelector ancestor in code-behind. The DXDataTemplateSelector works like WPF triggers.

See Also