Binding.UpdateSourceTrigger property

Applies to Windows and Windows Phone

Gets or sets a value that determines the timing of binding source updates for two-way bindings.

Syntax


public UpdateSourceTrigger UpdateSourceTrigger { get; set; }


<Binding UpdateSourceTrigger="updateSourceTriggerMemberName"/>

XAML Values

updateSourceTriggerMemberName

A named constant from the UpdateSourceTrigger enumeration, such as Explicit.

Property value

Type: UpdateSourceTrigger

One of the UpdateSourceTrigger values. The default is Default, which evaluates as a PropertyChanged update behavior.

Remarks

Your other choice for an UpdateSourceTrigger behavior is to set the value to be Explicit. When a two-way binding has its UpdateSourceTrigger value as Explicit, you must explicitly call UpdateSource on the relevant BindingExpression to cause the changed target values to update the data source. Use GetBindingExpression to get a BindingExpression from an object where a Binding to a dependency property exists and that binding is a two-way binding with UpdateSourceTrigger="Explicit".

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Data
Windows::UI::Xaml::Data [C++]

Metadata

Windows.winmd

See also

Binding
UpdateSource
Mode
XAML data binding sample
Data binding overview
Dependency properties overview
GetBindingExpression
BindingOperations.SetBinding

 

 

Show:
© 2014 Microsoft