Class MessageBoxDialogControllerExtensions
- Namespace
- Dmnk.Blazor.Dialogs.DefaultDialogs
- Assembly
- Dmnk.Blazor.Dialogs.dll
Extension methods for IVmDialogController to show simple message boxes with a single "OK" button, using the MessageBoxViewModel.
public static class MessageBoxDialogControllerExtensions
- Inheritance
-
MessageBoxDialogControllerExtensions
- Inherited Members
Methods
ShowError(IVmDialogController, MarkupString, string?, string?)
Like ShowMessageBox(IVmDialogController, MarkupString, MessageBoxType, string?, string?), but with the intent set to "Error" and the default title matching that intent. Beware of XSS vulnerabilities.
public static Task ShowError(this IVmDialogController dialog, MarkupString message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessageMarkupStringtitlestringconfirmTextstring
Returns
ShowError(IVmDialogController, string, string?, string?)
Like ShowMessageBox(IVmDialogController, string, MessageBoxType, string?, string?), but with the intent set to "Error" and the default title matching that intent.
public static Task ShowError(this IVmDialogController dialog, string message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessagestringtitlestringconfirmTextstring
Returns
ShowInfo(IVmDialogController, MarkupString, string?, string?)
Like ShowMessageBox(IVmDialogController, MarkupString, MessageBoxType, string?, string?), but with the intent set to "Information" and the default title matching that intent. Beware of XSS vulnerabilities.
public static Task ShowInfo(this IVmDialogController dialog, MarkupString message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessageMarkupStringtitlestringconfirmTextstring
Returns
ShowInfo(IVmDialogController, string, string?, string?)
Like ShowMessageBox(IVmDialogController, string, MessageBoxType, string?, string?), but with the intent set to "Information" and the default title matching that intent.
public static Task ShowInfo(this IVmDialogController dialog, string message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessagestringtitlestringconfirmTextstring
Returns
ShowMessageBox(IVmDialogController, MarkupString, MessageBoxType, string?, string?)
Like ShowMessageBox(IVmDialogController, string, MessageBoxType, string?, string?), but allows for markup in the message body. Beware of XSS vulnerabilities.
public static Task ShowMessageBox(this IVmDialogController dialog, MarkupString message, MessageBoxType type = MessageBoxType.Info, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessageMarkupStringtypeMessageBoxTypetitlestringconfirmTextstring
Returns
ShowMessageBox(IVmDialogController, string, MessageBoxType, string?, string?)
Show a simple messagebox with the given message and intent.
public static Task ShowMessageBox(this IVmDialogController dialog, string message, MessageBoxType type = MessageBoxType.Info, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllerThe dialog controller
messagestringThe message body
typeMessageBoxTypeSee MessageBoxType
titlestringThe title in the dialog header
confirmTextstringThe text of the confirmation button. Defaults to "OK".
Returns
ShowSuccess(IVmDialogController, MarkupString, string?, string?)
Like ShowMessageBox(IVmDialogController, MarkupString, MessageBoxType, string?, string?), but with the intent set to "Success" and the default title matching that intent. Beware of XSS vulnerabilities.
public static Task ShowSuccess(this IVmDialogController dialog, MarkupString message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessageMarkupStringtitlestringconfirmTextstring
Returns
ShowSuccess(IVmDialogController, string, string?, string?)
Like ShowMessageBox(IVmDialogController, string, MessageBoxType, string?, string?), but with the intent set to "Success" and the default title matching that intent.
public static Task ShowSuccess(this IVmDialogController dialog, string message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessagestringtitlestringconfirmTextstring
Returns
ShowWarning(IVmDialogController, MarkupString, string?, string?)
Like ShowMessageBox(IVmDialogController, MarkupString, MessageBoxType, string?, string?), but with the intent set to "Warning" and the default title matching that intent. Beware of XSS vulnerabilities.
public static Task ShowWarning(this IVmDialogController dialog, MarkupString message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessageMarkupStringtitlestringconfirmTextstring
Returns
ShowWarning(IVmDialogController, string, string?, string?)
Like ShowMessageBox(IVmDialogController, string, MessageBoxType, string?, string?), but with the intent set to "Warning" and the default title matching that intent.
public static Task ShowWarning(this IVmDialogController dialog, string message, string? title = null, string? confirmText = null)
Parameters
dialogIVmDialogControllermessagestringtitlestringconfirmTextstring