{i}
")); + + public string Age { get; set; } = ""; + + public MarkupString VeryLongDescription => (MarkupString)_longDescription; + + public override string ToString() => $"Age: {Age}"; +} diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Dialog/Examples/Dialog/SimpleDialog.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Dialog/Examples/Dialog/SimpleDialog.razor new file mode 100644 index 0000000000..74e5b647ef --- /dev/null +++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Dialog/Examples/Dialog/SimpleDialog.razor @@ -0,0 +1,36 @@ +@inherits FluentDialogInstance + ++ Last result: @GetResult() +
+ +@code +{ + private bool? Canceled; + + private async Task ShowSuccessAsync() + { + var result = await DialogService.ShowSuccessAsync("The action was a success"); + Canceled = result.Cancelled; + } + + private async Task ShowWarningAsync() + { + var result = await DialogService.ShowWarningAsync("This is your final warning"); + Canceled = result.Cancelled; + } + + private async Task ShowErrorAsync() + { + var result = await DialogService.ShowErrorAsync("This is an error"); + Canceled = result.Cancelled; + } + + private async Task ShowInformationAsync() + { + var result = await DialogService.ShowInfoAsync("This is a message"); + Canceled = result.Cancelled; + } + + private async Task ShowConfirmationAsync() + { + var result = await DialogService.ShowConfirmationAsync("Are you sure you want to delete this item?