I am using the ViewModel First approach and I am having problems transitioning from one ViewModel to another.
For example, I have two folders: View and ViewModels, and I have two files in each Page1View.xaml, Page2View.xamlandPage1ViewModel.cs, Page2ViewModel.cs
In my application launch, I have this line below and it works fine.
DisplayRootViewFor<Page1ViewModel>();
Now when I click the button from the event Page1ViewModel, when I add the line below, I get an exception with a null reference.
_navigationService.NavitageToViewModel<Page2ViewModel>();
Am I missing something here? To provide more information, this is a UWP application, and the container I use WinRTContainer, and I registered both ViewModels.