ComponentsFeedback and overlays
Dialog
Dialogs interrupt the page for a decision or a short task that must finish before the user continues. Show them through IDialogService, or inline with a bound Visible.
Show a dialog and await its result
ShowAsync renders a dialog component; awaiting Result gives you Canceled and Data.
No answer yet.
Positions
DialogOptions.Position places the dialog. Corners suit non-blocking panels; center suits decisions.
Passing parameters, returning data
DialogParameters<T> sets the dialog's parameters with type checking; DialogResult.Ok(value) returns typed data.
Choose a book to reserve.
Confirm a deletion
Name the thing being deleted, make the destructive button say what it does, and keep Cancel the safe default.
Maritime history
· 42 books
Children's picture books
· 118 books
Local authors
· 27 books
Edit a copy in a form
The dialog edits a copy and validates it; the list changes only when Save returns the copy. Cancel, Escape and the backdrop discard it.
Ada Okafor
ada@example.org · Saturday morning · 4 h/week
Tomás Lindqvist
tomas@example.org · Weekday evenings · 6 h/week
Edit a volunteer. The list keeps its values until you save.
Inline dialog
A MudDialog declared in the page and bound to Visible needs no separate component, and shares the page's state directly.
Font size 16 px, serif.
Options playground
Combine any DialogOptions, open the dialog to see the effect, and copy the generated options.
Not opened yet.
var options = new DialogOptions
{
MaxWidth = MaxWidth.Small,
CloseButton = true,
CloseOnEscapeKey = true
};
var dialog = await DialogService.ShowAsync<DialogNoticeDialog>("Dialog options", parameters, options);
var result = await dialog.Result;