Back to Devexpress

DXTriggerBase.Binding Property

wpf-devexpress-dot-xpf-dot-dxbinding-dot-dxtriggerbase.md

latest2.8 KB
Original Source

DXTriggerBase.Binding Property

Gets or sets the binding that produces the property value of the data object.

Namespace : DevExpress.Xpf.DXBinding

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public BindingBase Binding { get; set; }
vb
Public Property Binding As BindingBase

Property Value

TypeDescription
BindingBase

A binding to a property that produces the property value of the data object.

|

Remarks

The property value produced by this binding is compared with the value specified by the DXTriggerBase.Value property. That value is first converted to the type of the value of the binding (if possible), and then the two values are compared using the Object.Equals method. If the two values are equal, then the associated data templates are applied.

You need to specify both the Binding and DXTriggerBase.Value properties on a DXTriggerBase for the trigger to be meaningful. If both of the properties are not set, the trigger returns the default data template.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Binding property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-display-different-details-based-on-master-row-data/CS/WpfApp30/MainWindow.xaml#L27

xml
</dxg:DetailDescriptorSelector.DefaultValue>
<dxg:DetailDescriptorTrigger Binding="{Binding Succeed}" Value="False">
    <dxg:DataControlDetailDescriptor ItemsSourcePath="Errors">

See Also

DXDataTemplateSelector

DXTriggerBase Class

DXTriggerBase Members

DevExpress.Xpf.DXBinding Namespace