Binding​Expression Binding​Expression Binding​Expression Class

Definition

Contains information about a single instance of a Binding.

public class BindingExpression : BindingExpressionBase, IBindingExpressionpublic class BindingExpression : BindingExpressionBase, IBindingExpressionPublic Class BindingExpression Inherits BindingExpressionBase Implements IBindingExpression
Inheritance
BindingExpressionBindingExpressionBindingExpression
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The Binding class is the high-level class for the declaration of a binding. The BindingExpression class is the underlying object that maintains the connection between the binding source and the binding target. A Binding contains all the information that can be shared across several BindingExpression objects. A BindingExpression is an instance expression that cannot be shared and that contains all the instance information about the Binding.

You can obtain a BindingExpression object by calling the GetBindingExpression method on an object, specifying the dependency property that has the binding.

Properties

DataItem DataItem DataItem

Gets the binding source object that this BindingExpression uses.

public PlatForm::Object DataItem { get; }public object DataItem { get; }Public ReadOnly Property DataItem As object
Value
object object object

The binding source object that this BindingExpression uses.

Attributes

ParentBinding ParentBinding ParentBinding

Gets the Binding object of this BindingExpression.

public Binding ParentBinding { get; }public Binding ParentBinding { get; }Public ReadOnly Property ParentBinding As Binding
Value
Binding Binding Binding

The Binding object of the current binding expression.

Attributes

Remarks

You can't set the property values of a Binding object after that binding has been attached to a target element and target property. If you attempt this you'll get a run-time exception. Any Binding value you get back from ParentBinding is by definition a binding that's already been applied to a target, because you obtained the BindingExpression by calling FrameworkElement.GetBindingExpression.

Methods

UpdateSource() UpdateSource() UpdateSource()

Sends the current binding target value to the binding source property in TwoWay bindings.

public void UpdateSource()public void UpdateSource()Public Function UpdateSource() As void
Attributes

Remarks

If the UpdateSourceTrigger value of a two-way binding is set to Explicit, you must call the UpdateSource method or the changes will not propagate back to the source.

Calling this method does nothing if the Mode value of the binding is not TwoWay.