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
dialogIVmDialogControllerThe dialog controller instance
messageMarkupStringThe message/question shown to the user
typeMessageBoxTypeSee MessageBoxType
titlestringThe title in the dialog header. Default is set based on the
type.confirmTextstringThe text on the confirm button. Defaults to "Yes".
denyTextstringThe text on the deny button. Defaults to "No".
Returns
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
dialogIVmDialogControllerThe dialog controller instance
messagestringThe message/question shown to the user
typeMessageBoxTypeSee MessageBoxType
titlestringThe title in the dialog header. Default is set based on the
type.confirmTextstringThe text on the confirm button. Defaults to "Yes".
denyTextstringThe text on the deny button. Defaults to "No".