Table of Contents

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

dialog IVmDialogController
message MarkupString
title string
confirmText string

Returns

Task

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

dialog IVmDialogController
message string
title string
confirmText string

Returns

Task

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

dialog IVmDialogController
message MarkupString
title string
confirmText string

Returns

Task

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

dialog IVmDialogController
message string
title string
confirmText string

Returns

Task

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

dialog IVmDialogController
message MarkupString
type MessageBoxType
title string
confirmText string

Returns

Task

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

dialog IVmDialogController

The dialog controller

message string

The message body

type MessageBoxType

See MessageBoxType

title string

The title in the dialog header

confirmText string

The text of the confirmation button. Defaults to "OK".

Returns

Task

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

dialog IVmDialogController
message MarkupString
title string
confirmText string

Returns

Task

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

dialog IVmDialogController
message string
title string
confirmText string

Returns

Task

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

dialog IVmDialogController
message MarkupString
title string
confirmText string

Returns

Task

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

dialog IVmDialogController
message string
title string
confirmText string

Returns

Task