Export (0) Print
Expand All

BindingBase::Delay Property

.NET Framework 4.5

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)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
property int Delay {
	int get ();
	void set (int value);
}
<object Delay="int" .../>

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

Supported in: 4.5.3
Show:
© 2014 Microsoft