WPF结合isAsync获取国家 [英] WPF binding isAsync Get State

查看:785
本文介绍了WPF结合isAsync获取国家的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用绑定isAsync属性从属性的get访问保持UI响应和加载数据,并证明是一个不错的选择,而使用MVVM。这种方法是伟大的,不需要任何手动code为异步操作。存在其中我的数据加载正在几秒钟,在这段时间内是很困难的无数据与数据加载来区分几个实例。有没有我可以检测结合IsBusy或加载的状态,这样我就可以显示一些信息,即装载作业未完成房产?

I am using Binding IsAsync property to keep UI responsive and loading data from the get accessor of the property and proved to be a good option while using MVVM. This approach is great and doesn't need any manual code for async operations. There are few instances where my dataload is taking few seconds and during this time it is very difficult to differentiate between "no data" vs "data loading". Is there a property which I can detect the state of the binding "IsBusy" or "Loading", so that I can show some message that the loading operation is not complete?

任何帮助是AP preciated。

Any help is appreciated.

推荐答案

根据文档

在等待值到达,结合的报告FallbackValue,如果有一个可用,或结合目标属性的缺省值。

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.

您可以使用此值显示一条消息给用户在加载约束力。

You can use this value to display a message to the user while the binding is loading.

这篇关于WPF结合isAsync获取国家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆