This is a migrated thread and some comments may be shown as answers.

long running web service

5 Answers 83 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
tomas
Top achievements
Rank 1
tomas asked on 11 Aug 2010, 11:39 PM
Hello Telerik.

I am running some sort of exporting procedure on the server which is started by web service. I can exactly say how many files have been already exported and how many left.

How can I visualize the progress to the user in Silverlight application, please?

Thanks Tom

5 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 12 Aug 2010, 09:33 AM
Hello tomas,

You can use the BusyIndicator if you don't want the users to be able to interact with the application while loading:

http://demos.telerik.com/silverlight/#BusyIndicator/FirstLook

or the ProgressBar's indeterminate mode (IsIndeterminate property) if you do:

http://demos.telerik.com/silverlight/#ProgressBar/FirstLook

Hopefully this is what you are looking for,

Sincerely yours,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
tomas
Top achievements
Rank 1
answered on 12 Aug 2010, 11:21 AM
Thank you, but this is not what I am looking for.

I would like to show something like

2 of 50 documents converted (4 % finished)

How can I achieve this?

Thank you very much.

tom
0
Miroslav
Telerik team
answered on 12 Aug 2010, 11:29 AM
Hello tomas,

The ProgressBar can be as part of the view, say:

<telerik:RadProgressBar Minimum="0" Maximum="50" Value="2" />

The text can be a simple TextBlock that you updated together with the value of the ProgressBar when needed.

Sincerely yours,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
tomas
Top achievements
Rank 1
answered on 12 Aug 2010, 11:47 AM
Hello Miroslav.

Yes, I know. But what I dont know is how to receive the status of finished, remains status from web service.

I think I must use more then one tread on the client to update the UI.

Do you have some common patter how to solve this?

Thanks Tom
0
Miroslav
Telerik team
answered on 16 Aug 2010, 03:41 PM
Hi tomas,

All web requests in Silverlight are asynchronous, so the UI thread should not normally be blocked by a service call unless you are explicitly joining a thread.

Once you have established a session progress updates could happen in two ways:

- Polling - by constantly invoking a web method that returns the progress
- Push - by using a duplex service that will notify the Silverlight client once there is an update.

This talk has more information:

http://blogs.msdn.com/b/silverlightws/archive/2010/04/04/mix-2010-talk-what-s-new-in-wcf-in-silverlight-4.aspx

and a sample project:

http://blogs.msdn.com/b/silverlightws/archive/2009/09/30/having-a-pollingduplex-service-and-any-other-wcf-service-in-the-same-website-causes-silverlight-calls-to-be-slow.aspx

Please note that using a duplex service is essentially client -> server polling under the hood  and it may not scale very well.

Kind regards,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ProgressBar
Asked by
tomas
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
tomas
Top achievements
Rank 1
Share this question
or