views:

51

answers:

1

Hi,

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.

A: 

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.

AnthonyWJones
Thanks for replying. I am new to Silverlight 3 and as such havent been able to grasp the full power of BusyIndicator. What I could get to understand from my initial reading of BusyIndicator is that it requires some sort of event to activate it. While my requirement is to track any/all events.None the less I would see if the entire page can be enclosed with a BusyIndicator.Thanks for the suggestion.
Vaibhav
@Vaibhav: The BusyIndicator has an IsBusy property, it doesn't need to be set from an event. You can set it directly from code or you could bind the IsBusy to a [view]model property.
AnthonyWJones
@AnthonyWJones: Thanks for the suggestion. However, my intent is to set it declaratively in XAML and as such do we have any particular attribute to which i could assign the IsBusy property? It would then automatically track when a request was made (irrespective of which control initiated it) and display its Busy UI.Thanks.
Vaibhav