BindingExpression Class

Definition

Contains information about a single instance of a Binding.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Data.BindingExpression (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public ref class BindingExpression : BindingExpressionBase
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BindingExpression : BindingExpressionBase
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class BindingExpression : BindingExpressionBase
Public Class BindingExpression
Inherits BindingExpressionBase
Inheritance
Object IInspectable BindingExpressionBase BindingExpression
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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

Gets the binding source object that this BindingExpression uses.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Data.BindingExpression.DataItem (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

ParentBinding

Gets the Binding object of this BindingExpression.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Data.BindingExpression.ParentBinding (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Methods

UpdateSource()

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

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Data.BindingExpression.UpdateSource (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Applies to

See also