To perform long web operations without blocking the UI, such as uploading to the Azure Blob service, you can use the "async" version of the http calls, which are executed by the browser on a background thread and give a callback when they are complete. If you need to have a loop in order to make several calls in sequence without blocking the UI, you can use the async/await pattern, which makes it easy to call async methods in a loop while waiting for the callback before continuing the loop. When the execution is waiting for the result of an async call, the UI is not blocked and other operations can be performed.
Alternatively, to perform client-side tasks such as long calculations that cannot be done with async/await, you only have the following options:
- Block the UI but also force the UI to refresh by calling "Dispatcher.BeginInvoke(...)", as discussed in the following thread: http://forums.cshtml5.com/viewtopic.php?f=4&t=1452
- You can for example display a "Please wait..." message and update the percentage of the progress.