BindingBase.Delay 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 the amount of time, in milliseconds, to wait before updating the binding source after the value on the target changes.
public:
property int Delay { int get(); void set(int value); };
public int Delay { get; set; }
member this.Delay : int with get, set
Public Property Delay As Integer
Property Value
The amount of time, in milliseconds, to wait before updating the binding source.
Remarks
When you use a binding to update the binding source whenever the value of the property changes on the target, you set the Mode property to TwoWay and the UpdateSourceTrigger to PropertyChanged. In this situation, you can use the Delay property to specify whether there should be a time delay between when the target is changed and when the source is updated. This is useful when you want to enable users to change a property on a source object but you don't want each change to be immediately committed to the source. For example, suppose that you have a text box that is data two-way bound to a property of a data object. When the user changes the value in the text box, the source gets updated. To enable this scenario, you set the Mode property on the Binding to TwoWay and the UpdateSourceTrigger to PropertyChanged. To avoid updating the source object with every keystroke, set the Delay property to a reasonable value to cause the binding to update only after that amount of time has elapsed since the user stopped typing.