Hi..
i would to display a dialog with an image, make some operation and then close the dialog
Where I can find a sample?
Hi @Stefano_Carta,
Here is a demo that you can try - the Busy Dialog.
I am trying the demo..but I can’t undestand..
I have a procedure:
protected async Task FormSubmit()
{
…..
}
I have to substitute await Task.Delay(2000); in the demo with await FormSubmit();??
in this way the dialog appear after the procedure
Here is the relevant code from that demo:
async Task ShowBusyDialog(bool withMessageAsString)
{
_ = InvokeAsync(async () =>
{
// Simulate background task
await Task.Delay(2000);
// Close the dialog
DialogService.Close();
});
if (withMessageAsString)
{
await BusyDialog("Busy ...");
}
else
{
await BusyDialog();
}
}
The await Task.Delay(2000) is the code that shows background work. If it completes too quickly you would indeed see the dialog appear after the task.
Thanks!!
now it’s clear