Binding.IsAsync 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 indicates whether the Binding should get and set values asynchronously.
public:
property bool IsAsync { bool get(); void set(bool value); };
public bool IsAsync { get; set; }
member this.IsAsync : bool with get, set
Public Property IsAsync As Boolean
Property Value
The default is false
.
Remarks
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.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기