1

Currently iam developing a wpf application that have so many pages. So i created it like a single main window and according to the button or menu item click navigating pages into a frame. Iam pretty new at Wpf and even iam creating it in MVVM.

Navigation through PRISM is complicated for me. i have found so many articles , but most of them not for freshers in wpf. So how we can easily done it in MVVM? anyone have simple demo? Thanks in advance..

Reza ArabQaeni
  • 4,848
  • 27
  • 46
amz
  • 23
  • 1
  • 7

1 Answers1

4

There are a few options here, one which I use is developing your application as a SPA (Single page application). Essentially, you will have one master window, which will hold a ContentControl bound to the current View Model.

This tutorial seems to follow this idea rather well. Also, this should help.

If you need to create new windows then you should look into creating a window navigation service which can be injected into your View Models using dependency injection. This should help you further.

Mike Eason
  • 9,525
  • 2
  • 38
  • 63