Class ConfirmationDialogViewModel
- Namespace
- Dmnk.Blazor.Dialogs.DefaultDialogs
- Assembly
- Dmnk.Blazor.Dialogs.dll
Show a confirmation dialog with "Yes" and "No" buttons. The Result is a boolean indicating whether the user confirmed or denied the prompt. Prefer using ConfirmationDialogControllerExtensions to show this dialog.
public class ConfirmationDialogViewModel : MessageBoxViewModel, IVmDialogViewModel, INotifyPropertyChanged
- Inheritance
-
SimpleViewModelBaseSimpleDialogViewModelBaseConfirmationDialogViewModel
- Implements
- Inherited Members
Constructors
ConfirmationDialogViewModel()
public ConfirmationDialogViewModel()
Properties
ActionConfirmText
The text to show on the confirmation button. Defaults to "Yes".
public override string ActionConfirmText { get; init; }
Property Value
ActionDenyText
The text to show on the denial button. Defaults to "No".
public string ActionDenyText { get; init; }
Property Value
CloseCommand
Command to close the dialog, with the command parameter being a boolean indicating whether the user confirmed (true) or denied (false) the prompt.
public SimpleAsyncRelayCommand CloseCommand { get; }
Property Value
- SimpleAsyncRelayCommand
Exceptions
Result
Whether the user confirmed (true) or denied (false) the prompt. Will be false if the dialog was dismissed.
public bool Result { get; }