Class BlazorVmDialogController
A base class for an implementation of IVmDialogController. Dialog views are resolved via DI using IViewModelRegistry.
public abstract class BlazorVmDialogController : IVmDialogController
- Inheritance
-
BlazorVmDialogController
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
BlazorVmDialogController()
protected BlazorVmDialogController()
Methods
DefaultIconForIntent(MessageBoxType)
Return the default icon for a given message box type. This can be used by the MessageBoxViewModel and other similar dialogs to get the appropriate icon for the type of message box they are showing.
public abstract Icon DefaultIconForIntent(MessageBoxType type)
Parameters
typeMessageBoxType
Returns
Show<T>(VmDialogParameters, T)
Show the dialog for a given viewmodel.
Dialog views are resolved via DI through IViewModelRegistry.
Register view-viewmodel pairs using ViewModelRegistration in
your DI setup (e.g. via AddFluentMvvmDialogs()).
public Task<VmDialogReference> Show<T>(VmDialogParameters parameters, T viewModel) where T : IVmDialogViewModel
Parameters
parametersVmDialogParametersviewModelT
Returns
Type Parameters
T
Events
OnClose
Fired whenever a dialog is closed, either by calling Close() or Dismiss(). You typically won't need to use this, unless you are implementing a new dialog controller or provider.
public event Action<IVmDialogViewModel>? OnClose
Event Type
OnShow
Fired whenever a dialog is shown using Show<T>(VmDialogParameters, T). You typically won't need to use this, unless you are implementing a new dialog controller or provider.
public event Action<(VmDialogParameters Parameters, IVmDialogViewModel ViewModel, VmDialogReference Reference)>? OnShow