Binding.UpdateSourceTrigger Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that determines the timing of binding source updates for two-way bindings.
public:
property UpdateSourceTrigger UpdateSourceTrigger { UpdateSourceTrigger get(); void set(UpdateSourceTrigger value); };
UpdateSourceTrigger UpdateSourceTrigger();
void UpdateSourceTrigger(UpdateSourceTrigger value);
public UpdateSourceTrigger UpdateSourceTrigger { get; set; }
var updateSourceTrigger = binding.updateSourceTrigger;
binding.updateSourceTrigger = updateSourceTrigger;
Public Property UpdateSourceTrigger As UpdateSourceTrigger
<Binding UpdateSourceTrigger="updateSourceTriggerMemberName"/>
Property Value
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.
Applies to
See also
Feedback
Submit and view feedback for