Hi all,
Here's an update that shows how to do this with the current way the Window is used.
<TelerikButton OnClick="@DoLongWork">Do long work</TelerikButton>
<TelerikWindow @bind-Visible="@LoadingSignVisible" Modal="true">
<WindowTitle>
<strong>Please Wait</strong>
</WindowTitle>
<WindowContent>
@*Add animated gif and styling to taste*@
Please wait...we are processing your request.
</WindowContent>
</TelerikWindow>
@code {
bool LoadingSignVisible { get; set; }
//this method must be async so the UI can be updated while waiting for the remote service
async Task DoLongWork()
{
LoadingSignVisible = true;
await Task.Delay(3000);//simulate long running operation
LoadingSignVisible = false;
}
}
Regards,
Marin Bratanov
Progress Telerik
--Marin
The following article explains how you can make a loading sign for a client app: https://docs.telerik.com/blazor-ui/knowledge-base/loading-sign-client-app. After the app has initialized, switching views in a client app is a resource-intensive operation that blocks the browser UI thread, so you can't render a component during that operation.
Perhaps an option for a loading sign can be available with server-side Blazor where there may be some latency in the network traffic and server responses, so I am leaving this idea open so its implementation will be considered when it becomes popular.