Skip to content

Mvvm Framework

kobi2294 edited this page Apr 23, 2019 · 9 revisions

The Mvvm Framework

The Mvvm Kit is a strongly opinionated framework the helps to build advanced WPF applications.

Getting Started

To create an MvvmKit application, do the following:

  1. Create a new project using the Mvvm Kit Project Template for visual studio
  2. Create Components using the Mvvm Kit Component Template for visual studio
  3. The view model is inherited from ComponentBase, add bindable properties and delegate commands to it.
  4. Each Component comes with a resource dictionary for design time data, add design time instances of your view model
  5. Draw the view using the Design Time Data.
  6. Creates Model services by inheriting from ServiceBase
  7. Add the services to the Unity container in the Bootstrapper.
  8. Consume the services in the view models by declaring them in the Inject Method.
  9. Expose service state changes using AsyncEvent
  10. Define global regions in the application using the GlobalRegions static class
  11. Define region hosts in the container view by using the GlobalHost attached properties
  12. If the region has a small constant set of possible views, you can define a router for that region and use it for navigation. Otherwise, you can perform navigations directly on the region using the region manager.
  13. You can define Dialog Components by inheriting the view model from DialogBase instead of ComponentBase.
  14. You can run the dialogs and collect the results using the regions manager and a dedicated dialogs host.

Clone this wiki locally