79487699

Date: 2025-03-05 21:12:34
Score: 1
Natty:
Report link

I have used the BackdropClick = false in the Dialog options like that:

OpenDialogAsync(_maxWidth))" Variant="Variant.Filled" Color="Color.Primary">Add New Stock

@code { private readonly DialogOptions _maxWidth = new() { MaxWidth = MaxWidth.Medium, FullWidth = true, BackdropClick = false };

protected override void OnInitialized()
{
    Console.WriteLine("Starter component loaded!");
}

private Task OpenDialogAsync(DialogOptions options)
{
    var parameters = new DialogParameters<StockDialog>
    {
        { x => x.ContentText, "Your computer seems very slow, click the download button to download free RAM." },
        { x => x.ButtonText, "Download" },
        { x => x.Color, Color.Info }
    };

    return DialogService.ShowAsync<StockDialog>("Custom Options Dialog", parameters, options);
}

}

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @code
  • Low reputation (1):
Posted by: ZIELIK