Navigation and Pages using Model-View-ViewModel (MVVM)

I am working on a project at work that is a navigation application.

I wanted to use MVVM. I also wanted to document for others how I designed this, as there wasn’t much online about using MVVM with Navigation and Pages.

Here is my project. I will post an explanation of this project as soon as I can get to it, so look for it.

Project Download – Small: Navigation-Pages-MVVM.zip

Project Download – More complete: Navigation-Pages-MVVM 2.0

5 Comments

  1. Henrique says:

    Dude, thank you very much for this.
    Indeed, documentation for MVVM + Navigation without any third party is escarse.

  2. Alexey says:

    I think it’s not the best idea to create view instances in view model class. It makes much more difficult to write unit tests for this view model.

    • Rhyous says:

      In production we have an IController interface and a concrete Controller that we pass into the ViewModels with Dependency Injection and the on click goes next.

      To pull this into a publishable example and exclude my company specific code, it was simplified and dependency injection was excluded.

  3. Harri says:

    Hi,thanks
    Pretty good example about wpf + mvvm with navigation.
    Only needed.
    Simple and elegant.

Leave a Reply

*