there are any number of progress bars, spinner, popup dialog available in html.
- If the progress display is all javascript/html you can use jsinterop to update.
- current blazer WASM is single threaded (all threading is cooperative co-routines). if you want to use razor to update, then you will need to allow the UI main loop to run:
var notDone = true;
while (notDone)
{
notDone = DoSomeWork();// Make the steps as small as possible, Task.Run is of no use
StateHasChanged(); // force ui update
await Task.Delay(1); // give the UI some time to catch up
}
you can also use Web Workers to get a separate thread to do the long running process, but this would require converting the long running code to javascript.