You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
798 B
30 lines
798 B
3 years ago
|
@*@inject IDialogService DialogService
|
||
|
|
||
|
|
||
|
<MudButton @onclick="OpenDialog" Variant="Variant.Filled" Color="Color.Primary">
|
||
|
Open Simple Dialog
|
||
|
</MudButton>
|
||
|
@code {
|
||
|
|
||
|
private void OpenDialog()
|
||
|
{
|
||
|
var options = new DialogOptions { CloseOnEscapeKey = true };
|
||
|
DialogService.Show<DialogUsageExample_Dialog>("Simple Dialog", options);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
<MudDialog>
|
||
|
<DialogContent>
|
||
|
Dialog Content
|
||
|
</DialogContent>
|
||
|
<DialogActions>
|
||
|
<MudButton OnClick="Cancel">Cancel</MudButton>
|
||
|
<MudButton Color="Color.Primary" OnClick="Submit">Ok</MudButton>
|
||
|
</DialogActions>
|
||
|
</MudDialog>
|
||
|
@code {
|
||
|
[CascadingParameter] MudDialogInstance MudDialog { get; set; }
|
||
|
|
||
|
void Submit() => MudDialog.Close(DialogResult.Ok(true));
|
||
|
void Cancel() => MudDialog.Cancel();
|
||
|
}*@
|