Replies: 2 comments
-
Did you register the page with name TabB in DI?
|
Beta Was this translation helpful? Give feedback.
-
@thomasgalliker thanks for chiming in. We're all good there with your recommendations. This isn't a new project and those pages were always registered. We're just changing the navigation from flyout to tab. Once we switched to tab navigation TabB still always worked with SelectedTab(...). When it didn't work was when I did .CreateTab(t => t.AddNavigationPage().AddSegment()). I did figure this out through inspection though. Unfortunately it doesn't seem the API has the ability to name the navigationpage segment. So through guessing I put in .SelectedTab("NavigationPage") and that fixed it. |
Beta Was this translation helpful? Give feedback.
-
I used to use a simple tab setup but now I need to use a setup similar to the demo (Tabbed option on root page):
Prism/e2e/Maui/PrismMauiDemo/ViewModels/RootPageViewModel.cs
Line 23 in ec09b17
Similar to the demo example, however, this is my main page: TabA, TabB (with navigation page), TabB, TabC.
How do I programmatically navigate to TabB on start (or anytime really)? If I use .SelectedTab(...) I get "No child page was found with key" error.
Thx!
Beta Was this translation helpful? Give feedback.
All reactions