Table of Contents

Class ConfirmationDialogControllerExtensions

Namespace
Dmnk.Blazor.Dialogs.DefaultDialogs
Assembly
Dmnk.Blazor.Dialogs.dll

Some small extension methods to make showing confirmation dialogs (see ConfirmationDialogViewModel) easier.

public static class ConfirmationDialogControllerExtensions
Inheritance
ConfirmationDialogControllerExtensions
Inherited Members

Methods

ShowConfirmation(IVmDialogController, MarkupString, MessageBoxType, string?, string?, string?)

Show a confirmation dialog with the given message and intent. The returned task will complete with true if the user confirmed, false if they denied (or dismissed).

Like ShowConfirmation(IVmDialogController, string, MessageBoxType, string?, string?, string?), but allows for markup in the message. As always, beware of XSS vulnerabilities.

public static Task<bool> ShowConfirmation(this IVmDialogController dialog, MarkupString message, MessageBoxType type = MessageBoxType.Confirmation, string? title = null, string? confirmText = null, string? denyText = null)

Parameters

dialog IVmDialogController

The dialog controller instance

message MarkupString

The message/question shown to the user

type MessageBoxType

See MessageBoxType

title string

The title in the dialog header. Default is set based on the type.

confirmText string

The text on the confirm button. Defaults to "Yes".

denyText string

The text on the deny button. Defaults to "No".

Returns

Task<bool>

ShowConfirmation(IVmDialogController, string, MessageBoxType, string?, string?, string?)

Show a confirmation dialog with the given message and intent. The returned task will complete with true if the user confirmed, false if they denied (or dismissed).

public static Task<bool> ShowConfirmation(this IVmDialogController dialog, string message, MessageBoxType type = MessageBoxType.Confirmation, string? title = null, string? confirmText = null, string? denyText = null)

Parameters

dialog IVmDialogController

The dialog controller instance

message string

The message/question shown to the user

type MessageBoxType

See MessageBoxType

title string

The title in the dialog header. Default is set based on the type.

confirmText string

The text on the confirm button. Defaults to "Yes".

denyText string

The text on the deny button. Defaults to "No".

Returns

Task<bool>