BindingExpression
BindingExpression
BindingExpression
BindingExpression
Class
Definition
public : class BindingExpression : BindingExpressionBase, IBindingExpressionpublic class BindingExpression : BindingExpressionBase, IBindingExpressionPublic Class BindingExpression Inherits BindingExpressionBase Implements IBindingExpression// This API is not available in Javascript.
- Inheritance
-
BindingExpressionBindingExpressionBindingExpressionBindingExpression
- Attributes
| 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 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// This API is not available in Javascript.
- Value
- PlatForm::Object 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; }public Binding ParentBinding { get; }Public ReadOnly Property ParentBinding As Binding// This API is not available in Javascript.
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() 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// This API is not available in Javascript.
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.