Table of Contents

Class DialogViewModelBase

Namespace
Dmnk.Blazor.Dialogs.CommunityToolkit
Assembly
Dmnk.Blazor.Dialogs.CommunityToolkit.dll

Defines an MVVM ViewModel for a dialog. Basically just a regular ViewModel, except it holds a reference to the dialog and can react to dismissal by the user.

public class DialogViewModelBase : ObservableObject, INotifyPropertyChanging, IVmDialogViewModel, INotifyPropertyChanged
Inheritance
DialogViewModelBase
Implements
Inherited Members

Constructors

DialogViewModelBase()

public DialogViewModelBase()

Properties

Dialog

A reference to the dialog.

public VmDialogReference Dialog { get; set; }

Property Value

VmDialogReference

Methods

OnDismiss()

Called when the dialog is dismissed by the user, e.g. by clicking outside the dialog or by clicking a cancel button. This is called before the dialog is actually closed, so you can e.g. still do some cleanup work.

public virtual void OnDismiss()

OnDismissAsync()

Async version of OnDismiss()

public virtual Task OnDismissAsync()

Returns

Task