PrismLibrary / Prism.Maui

This is an experimental repo. The code here will eventually be merged into the main Prism repo as a full fledged platform at which time this repo will be archived.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Select Tab from one of the child page.

ComplexVariable opened this issue · comments

Hi,

Is it possible to select the tab from child page inside a tab. e.g

3 tabs in Root (Tab1, Tab2, Tab3)

Page Stack in Tab1 is : Tab1 > View A > View B > Goto Tab3

I tried looking into documentation couldn't find anything for Prism.MAUI. I created the tabs like this.

/TabbedPage?createTab=NavigationPage|Tab1&createTab=NavigationPage|Tab2&createTab=NavigationPage|Tab3
Is it possible to select Tab3 from View B?

"selectedTab=Tab3" is not working. I am getting the below exception when trying it.


[DOTNET] Navigation: app://prismapp.maui/TabbedPage?selectedTab=Tab2
[DOTNET] Result: Failed
[DOTNET] Object reference not set to an instance of an object.
[DOTNET] System.NullReferenceException: Object reference not set to an instance of an object.
[DOTNET]    at Prism.Navigation.PageNavigationService.OnNavigatedTo(Page toPage, INavigationParameters parameters) in /_/src/Prism.Maui/Navigation/PageNavigationService.cs:line 734
[DOTNET]    at Prism.Navigation.PageNavigationService.DoNavigateAction(Page fromPage, String toSegment, Page toPage, INavigationParameters parameters, Func`1 navigationAction, Action`1 onNavigationActionCompleted) in /_/src/Prism.Maui/Navigation/PageNavigationService.cs:line 701
[DOTNET]    at Prism.Navigation.PageNavigationService.ProcessNavigationForRootPage(String nextSegment, Queue`1 segments, INavigationParameters parameters, Nullable`1 useModalNavigation, Boolean animated) in /_/src/Prism.Maui/Navigation/PageNavigationService.cs:line 457
[DOTNET]    at Prism.Navigation.PageNavigationService.ProcessNavigation(Page currentPage, Queue`1 segments, INavigationParameters parameters, Nullable`1 useModalNavigation, Boolean animated) in /_/src/Prism.Maui/Navigation/PageNavigationService.cs:line 346
[DOTNET]    at Prism.Navigation.PageNavigationService.NavigateAsync(Uri uri, INavigationParameters parameters) in /_/src/Prism.Maui/Navigation/PageNavigationService.cs:line 295

Please ask questions in the Prism Discussions.