How to get INavigationService for NavigationPage on master page #2353
-
In v7.2.0 the INavigationService object for a MasterPageViewModel, within a Master Detail content page, related to NavigationPage contained on the Master Page. In version v8.0.0 this has changed so the INavigationService relates to the Detail Page, even when the Master Page contains its own NavigationPage. I understand many people will want to use the master page as a means of navigating pages on the detail page, but in our case (specifically on a tablet) we also want to be able to navigate to different pages within the NavigationPage on the master page. We need to be able to obtain an INavigationService, within the MasterPageViewModel, for both the master and detail pages. In v7.2.0 we found a way to do this, but the changes in v8.0.0 mean this no longer works. How can we get an INavigationService object which relates to the navigation stack of a NavigationPage contained on a Master Page, as t present it returns the INavigationService of the NavigationPage on the Detail Page? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There was a breaking bug introduced related to DI scoping that has changed the way the INavigationService is injected into a Page's VM. This is a known issue and will be fixed in the next release. Unless you need something new from Prism 8, I would recommend you wait to upgrade until we can fix the issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks for an unbelievable quick response. We will wait. Many thanks. |
Beta Was this translation helpful? Give feedback.
There was a breaking bug introduced related to DI scoping that has changed the way the INavigationService is injected into a Page's VM. This is a known issue and will be fixed in the next release. Unless you need something new from Prism 8, I would recommend you wait to upgrade until we can fix the issue.