BindingExpression BindingExpression BindingExpression BindingExpression Class


Contains information about a single instance of a Binding.

public : class BindingExpression : BindingExpressionBase, IBindingExpression
struct winrt::Windows::UI::Xaml::Data::BindingExpression : BindingExpressionBase, IBindingExpression
public class BindingExpression : BindingExpressionBase, IBindingExpression
Public Class BindingExpression Inherits BindingExpressionBase Implements IBindingExpression
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


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.


DataItem DataItem DataItem DataItem

Gets the binding source object that this BindingExpression uses.

public : Platform::Object DataItem { get; }
winrt::Windows::Foundation::IInspectable DataItem();
public object DataItem { get; }
Public ReadOnly Property DataItem As object
object object

The binding source object that this BindingExpression uses.

ParentBinding ParentBinding ParentBinding ParentBinding

Gets the Binding object of this BindingExpression.

public : Binding ParentBinding { get; }
Binding ParentBinding();
public Binding ParentBinding { get; }
Public ReadOnly Property ParentBinding As Binding
Binding Binding

The Binding object of the current binding expression.


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.


UpdateSource() UpdateSource() UpdateSource() UpdateSource()

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

public : void UpdateSource()
void UpdateSource() const;
public void UpdateSource()
Public Function UpdateSource() As void


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.

See Also