Toolkit Architecture

Hierarchy of Viewmodel Base Classes

MugenMvvm has a bunch of base view models for different usage scenarios:

  • ViewModelBase - base class for all ViewModels. Contains methods for creation of others ViewModels, methods for message passing beetwen VMs, properties and method to control the state of async operations (IsBusy, BusyMessage, etc.). Inherits NotifyPropertyChanged.
1920

ViewModelBase inheritance hierarchy diagram

  • CloseableViewModel - inherits ViewModelBase class, implements IClosableViewModel interface that allows to control the closing behaviour of ViewModel.
1920

CloseableViewModel inheritance hierarchy diagram

  • ValidatableViewModel - inherits CloseableViewModel class and contains methods and properties for validation. Also implements INotifyDataErrorInfo to notificate bindings about errors.
1920

ValidatableViewModel inheritance hierarchy diagram

  • EditableViewModel - inherits ValidatableViewModel, allows to edit and validate models. This viewmodel is tracing the state of model object and allows to undo any changes.
1920

EditableViewModel inheritance hierarchy diagram

  • WorkspaceViewModel - inherits CloseableViewModel class. Contains properties IsSelected and DisplayName. The first one allows to trace whenever VM was selected. The second one allows to show some useful text on the View through binding on any text property in View's control. Implements IViewAwareViewModel interface that allows to work with View through IView View property. Implements INavigableViewModel interface that allows to control navigation of ViewModel (through methods OnNavigatingFrom, OnNavigatedFrom, OnNavigatedTo).
1920

WorkspaceViewModel inheritance hierarchy diagram

  • GridViewModel - inherits ViewModelBase, allows to work with different collections of objects through mechanism of bindings.
1920

GridViewModel inheritance hierarchy diagram

  • MultiViewModel - inherits CloseableViewModel, allows to work with collection of viewmodels (especially useful for work with TabControl).
1920

MultiViewModel inheritance hierarchy diagram