Silverlight页面级活动检测
我有一个 Silverlight 3 应用程序,需要在页面上有任何活动时显示进度。我的页面上有各种按钮、一些下拉列表和其他 UI 元素,其中大多数都能够发出请求。
//编辑
并因此为每个控件注册 BusyIndicator 控件是我试图避免的。
BusyIndicator 控件应根据页面中的任何异步调用自动工作。我试图以声明方式将 BusyIndicator 控件绑定到页面级别,而不更改代码隐藏中的 IsBusy 属性。 我试图避免在代码隐藏中设置 IsBusy 属性。
简而言之,每当从页面发出请求时,无论是从任何控件发出请求,BusyIndicator 都应通知用户此类工作,并根据请求及其状态显示自身(请求完成时隐藏自身)。
在 SL 3 中实现上述内容是否足够可行?
任何建议将不胜感激。
(请求、活动等术语是广义使用的,我只是想用应用程序术语来表示它们,而不是技术术语)。
谢谢&问候。
I have a Silverlight 3 application that needs to display progress whenever there is any activity on the page. I have various buttons on the page, some drop down lists and other UI elements, most of which are capable of making a request.
//Edited
and as such registering the BusyIndicator control for each of them is what I am trying to avoid.
The BusyIndicator control should work automatically based on any async call from the page. I am trying to bind the BusyIndicator control declaratively to page level without changing the IsBusy property in code-behind.
Setting the IsBusy property in code-behind is what i am trying to avoid.
To simply state, whenever a request is made from the page, be it from any control, the BusyIndicator should inform the user of such work and display itself based on the request and its status (hide itself when the request completes).
Is it feasible enough to implement the above in SL 3?
Any suggestions will be appreciated.
(The terms request, activity etc. are used in broad sense and I simply intend to mean them in the application parlance, no technical jargon intended).
Thanks & Regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不完全确定为什么您认为每个控件都需要一个 BusyIndicator,为什么不将整个页面放在一个 BusyIndicator 中。让所有控件通过这个 BusyIndicator 指示忙。
I'm not entirely sure why you believe you would need a BusyIndicator per control, why not place the entire page in a single BusyIndicator. Have all the controls indicate busy through this single BusyIndicator.