Table of Contents

Class MessageBoxViewModel

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

ViewModel for a simple message box dialog, which displays a message and an "OK" button. See the MessageBox functions in Dmnk.Blazor.Dialogs.DefaultDialogs.VmDialogControllerExtensionsHelpers for usage.

public class MessageBoxViewModel : SimpleDialogViewModelBase, IVmDialogViewModel, INotifyPropertyChanged
Inheritance
SimpleViewModelBase
SimpleDialogViewModelBase
MessageBoxViewModel
Implements
Derived
Inherited Members

Constructors

MessageBoxViewModel()

public MessageBoxViewModel()

Properties

ActionConfirmText

The text to show on the confirmation button. Defaults to "OK".

public virtual string ActionConfirmText { get; init; }

Property Value

string

Message

The message body to display in the message box.

One of this property and MessageMarkup must be set.

public string? Message { get; init; }

Property Value

string

MessageMarkup

Like Message, but allows for markup. Beware of XSS vulnerabilities.

One of this property and MessageMarkup must be set.

public MarkupString? MessageMarkup { get; init; }

Property Value

MarkupString?

Type

public MessageBoxType Type { get; init; }

Property Value

MessageBoxType

Methods

DisplayMessage()

Get either the plain text message or the markup message, depending on which one is set.

public object DisplayMessage()

Returns

object