Navigation in NavigationView via MVVM using Prism

Prism UWP: Prism for UWP
NavigationView UWP: NavigationView

I want to apply MVVM on my NavigationView navigation, I found this article: navigation via mvvm but Iam using Prism, so it doesnt solve my problem.

Navigation in prism:

using Prism.Unity.Windows;

NavigationService.Navigate("Main", null);

1 answer

  • answered 2019-10-08 03:31 Xavier Xie

    You could use the Windows Template Studio to create your project and choose the 'Navigation Pane' and 'prism Design pattern'.

    Then, you will see the _navigationService in the ShellViewModel class.

    You could use it for navigation.

    _navigationService.Navigate(pageKey, null);