Windows apps
Collapse the table of content
Expand the table of content
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.

BindingBase.Delay Property

.NET Framework (current version)
 

Gets or sets the amount of time, in milliseconds, to wait before updating the binding source after the value on the target changes.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

public int Delay { get; set; }

Property Value

Type: System.Int32

The amount of time, in milliseconds, to wait before updating the binding source.

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.

.NET Framework
Available since 4.5
Return to top
Show:
© 2016 Microsoft