C#C
C#8mo ago
Paprika

MudBlazor Dialogs dont show up

update:

I just updated my dialog to:

@using MudBlazor
@inject IDialogService DialogService
@inject IMudDialogInstance MudDialog

<MudDialog>
<TitleContent>Bestätigung</TitleContent>
<DialogContent>
<MudText>@ContentText</MudText>
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel" Color="Color.Default">Abbrechen</MudButton>
<MudButton OnClick="Confirm" Color="@Color">@ButtonText</MudButton>
</DialogActions>
</MudDialog>

@code {
[Parameter] public string ContentText { get; set; } = "Bist du sicher?";
[Parameter] public string ButtonText { get; set; } = "Bestätigen";
[Parameter] public Color Color { get; set; } = Color.Primary;

void Confirm() => MudDialog.Close(DialogResult.Ok(true));
void Cancel() => MudDialog.Cancel();
}

(Still doesnt work tho :/)
Was this page helpful?