BindingExpression BindingExpression BindingExpression Class

Contains information about a single instance of a Binding.

Syntax

Declaration

public class BindingExpressionpublic class BindingExpressionPublic Class BindingExpression

Inheritance Hierarchy

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(DependencyProperty) method on an object, specifying the dependency property that has the binding.

Properties summary

Gets the binding source object that this BindingExpression uses.

Gets the Binding object of this BindingExpression.

Methods summary

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

Properties

  • DataItem
    DataItem
    DataItem
    DataItem

    Gets the binding source object that this BindingExpression uses.

    public object DataItem { get; }public object DataItem { get; }Public ReadOnly Property DataItem As objectpublic object DataItem { get; }

    Property Value

  • ParentBinding
    ParentBinding
    ParentBinding
    ParentBinding

    Gets the Binding object of this BindingExpression.

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

    Property Value

    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 GetBindingExpression(DependencyProperty).

Methods

  • UpdateSource()
    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 voidpublic void UpdateSource()

    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.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ComposableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Data.dll