Table of Contents

Class Binding

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

Describes an instance of a Binding, binding a target (DependencyObject, DependencyProperty) to a source (object, property)

public class Binding : BindingBase
Inheritance
Binding

Constructors

Binding()

Default constructor.

Binding(string)

Convenience constructor. Sets most fields to default values.

Fields

DoNothing

A source property or a converter can return Binding.DoNothing to instruct the binding engine to do nothing (i.e. do not transfer a value to the target, do not move to the next Binding in a PriorityBinding, do not use the fallback or default value).

IndexerName

This string is used as the PropertyName of the PropertyChangedEventArgs to indicate that an indexer property has been changed.

SourceUpdatedEvent

The SourceUpdated event is raised whenever a value is transferred from the target to the source, but only for Bindings that have requested the event by setting BindFlags.NotifyOnSourceUpdated.

TargetUpdatedEvent

The TargetUpdated event is raised whenever a value is transferred from the source to the target, but only for Bindings that have requested the event by setting BindFlags.NotifyOnTargetUpdated.

XmlNamespaceManagerProperty

The XmlNamespaceManager to use to perform Namespace aware XPath queries in XmlData bindings

Properties

AsyncState

Opaque data passed to the asynchronous data dispatcher

BindsDirectlyToSource

True if Binding should interpret its path relative to the data item itself.

Converter

The Converter to apply

ConverterCulture

Culture in which to evaluate the converter

ConverterParameter

The parameter to pass to converter.

ElementName

Name of the element to use as the source

IsAsync

True if Binding should get/set values asynchronously

Mode

Binding mode

NotifyOnSourceUpdated

Raise SourceUpdated event whenever a value flows from target to source

NotifyOnTargetUpdated

Raise TargetUpdated event whenever a value flows from source to target

NotifyOnValidationError

Raise ValidationError event whenever there is a ValidationError on Update

Path

The source path (for CLR bindings).

RelativeSource

Description of the object to use as the source, relative to the target element.

Source

object to use as the source

UpdateSourceExceptionFilter

called whenever any exception is encountered when trying to update the value to the source. The application author can provide its own handler for handling exceptions here. If the delegate returns null - don't throw an error or provide a ValidationError. Exception - returns the exception itself, we will fire the exception using Async exception model. ValidationError - it will set itself as the BindingInError and add it to the element's Validation errors.

UpdateSourceTrigger

Update type

ValidatesOnDataErrors

True if a data error in the source item should be considered a validation error.

ValidatesOnExceptions

True if an exception during source updates should be considered a validation error.

ValidatesOnNotifyDataErrors

True if a data error from INotifyDataErrorInfo source item should be considered a validation error.

ValidationRules

Collection<ValidationRule> is a collection of ValidationRule implementations on either a Binding or a MultiBinding. Each of the rules is run by the binding engine when validation on update to source

XPath

The XPath path (for XML bindings).

Methods

AddSourceUpdatedHandler(DependencyObject, EventHandler<DataTransferEventArgs>)

Adds a handler for the SourceUpdated attached event

AddTargetUpdatedHandler(DependencyObject, EventHandler<DataTransferEventArgs>)

Adds a handler for the TargetUpdated attached event

GetXmlNamespaceManager(DependencyObject)

Static accessor for XmlNamespaceManager property

RemoveSourceUpdatedHandler(DependencyObject, EventHandler<DataTransferEventArgs>)

Removes a handler for the SourceUpdated attached event

RemoveTargetUpdatedHandler(DependencyObject, EventHandler<DataTransferEventArgs>)

Removes a handler for the TargetUpdated attached event

SetXmlNamespaceManager(DependencyObject, XmlNamespaceManager)

Static modifier for XmlNamespaceManager property