Επεξεργασία

Κοινή χρήση μέσω


MultiBinding.Mode Property

Definition

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

public:
 property System::Windows::Data::BindingMode Mode { System::Windows::Data::BindingMode get(); void set(System::Windows::Data::BindingMode value); };
public System.Windows.Data.BindingMode Mode { get; set; }
member this.Mode : System.Windows.Data.BindingMode with get, set
Public Property Mode As BindingMode

Property Value

One of the BindingMode values. The default value 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 Text, 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(Type) and then check the Boolean value of the BindsTwoWayByDefault property.

Remarks

The values of the Mode and UpdateSourceTrigger properties determine the functionality of the MultiBinding and are used as the default values for all the bindings in the collection unless an individual binding overrides these properties. For example, if the Mode property on the MultiBinding object is set to TwoWay, then all the bindings in the collection are considered TwoWay unless you set a different Mode value on one of the bindings explicitly. For more information, see the Binding.Mode and Binding.UpdateSourceTrigger properties.

Applies to