Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Binding.Mode Property

Gets or sets a value that indicates the direction of the data flow in the binding.

Namespace:  System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public BindingMode Mode { get; set; }
<object Mode="BindingMode" .../>

Property Value

Type: System.Windows.Data.BindingMode
One of the BindingMode values. The default is Default, which returns the default binding mode value of the target dependency property. However, the default value varies for each dependency property. In general, user-editable control properties, such as those of text boxes and check boxes, default to two-way bindings, whereas most other properties default to one-way bindings.
A programmatic way to determine whether a dependency property binds one-way or two-way by default is to get the property metadata of the property using GetMetadata and then check the Boolean value of the BindsTwoWayByDefault property.

To support OneWay and TwoWay bindings, the underlying data must implement INotifyPropertyChanged. For details, see How to: Implement Property Change Notification.

For TwoWay or OneWayToSource bindings, you can control the target-to-source updates by setting the UpdateSourceTrigger property. For more information, see UpdateSourceTrigger.

For more information on the different binding modes, see Data Binding Overview.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft