How to: Specify the Direction of the Binding
This example shows how to specify whether the binding updates only the binding target (target) property, the binding source (source) property, or both the target property and the source property.
You use the Mode property to specify the direction of the binding. The following enumeration list shows the available options for binding updates:
TwoWay updates the target property or the property whenever either the target property or the source property changes.
OneWay updates the target property only when the source property changes.
OneWayToSource updates the source property when the target property changes.
For more information, see the BindingMode enumeration.
The following example shows how to set the Mode property.
To detect source changes (applicable to OneWay and TwoWay bindings), the source must implement a suitable property change notification mechanism such as INotifyPropertyChanged. See How to: Implement Property Change Notification for an example of an INotifyPropertyChanged implementation.