Contains information about a single instance of a Binding.
public sealed class BindingExpression : System.Windows.Data.BindingExpressionBase, System.Windows.IWeakEventListener
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.
For example, consider the following, where
myDataObject is an instance of the
myBinding is the source Binding object, and
MyData class is a defined class that contains a string property named
MyDataProperty. This example binds the text content of
mytext, which is an instance of TextBlock, to
//make a new source MyData myDataObject = new MyData(DateTime.Now); Binding myBinding = new Binding("MyDataProperty"); myBinding.Source = myDataObject; myText.SetBinding(TextBlock.TextProperty, myBinding);
Dim data1 As New MyData(DateTime.Now) Dim binding1 As New Binding("MyDataProperty") binding1.Source = data1 Me.myText.SetBinding(TextBlock.TextProperty, binding1)
You can use the same
myBinding object to create other bindings. For example, you might use the
myBinding object to bind the text content of a check box to
MyDataProperty. In that scenario, there will be two instances of BindingExpression that share the
Gets the binding source object that this BindingExpression uses.
Gets the binding source object for this BindingExpression.
Gets the name of the binding source property for this BindingExpression.
Forces a data transfer from the binding source property to the binding target property.
Explicit Interface Implementations
|IWeakEventListener.ReceiveWeakEvent(Type, Object, EventArgs)||
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.