IsAsync Property

Binding.IsAsync Property

 

Gets or sets a value that indicates whether the Binding should get and set values asynchronously.

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

Public Property IsAsync As Boolean

Property Value

Type: System.Boolean

The default is null.

Use the IsAsync property when the get accessor of your binding source property might take a long time. One example is an image property with a get accessor that downloads from the Web. Setting IsAsync to true avoids blocking the UI while the download occurs.

While waiting for the value to arrive, the binding reports the FallbackValue, if one is available, or the default value of the binding target property.

However, there should not be many scenarios where you need to use the IsAsync property. The .NET guidelines recommend against defining properties that are orders of magnitude slower than a field set would be. When you are creating your class, consider handling extremely slow operations outside of the get accessor and caching the result. For more information, see NIB: Choosing Between Properties and Methods.

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