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
-
SimpleViewModelBaseSimpleDialogViewModelBaseMessageBoxViewModel
- 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
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
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
Type
See MessageBoxType
public MessageBoxType Type { get; init; }
Property Value
Methods
DisplayMessage()
Get either the plain text message or the markup message, depending on which one is set.
public object DisplayMessage()