Replies: 3 comments 4 replies
-
|
Use Sextant.Maui instead of the built-in RoutedViewHost for MAUI navigation. Replace |
Beta Was this translation helpful? Give feedback.
-
|
Multiple options, some people use Prism navigation with RxUI, they both operate with each other and this is URL based navigation. Others use Sextant |
Beta Was this translation helpful? Give feedback.
-
|
For MAUI, use Sextant.Maui instead of RoutedViewHost to avoid NavigationStack sync issues. Install via NuGet, register views with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
I recently ran into an interesting issue with RoutedViewHost on MAUI. When implementing navigation from a LoginPage to a HomePage, I wanted to reset the navigation stack so the back button would not return to the login screen. Even though the navigation stack was being cleared correctly and only the HomePage remained, the back button still appeared, I was using latest nuget package.
After some investigation, I discovered that although the stack reset worked, the internal logic that syncs the Router with the NavigationStack was re-adding the LoginPage.
To troubleshoot this, I downloaded the RoutedViewHost implementation for MAUI, and—with a lot of help from Copilot—I managed to fix the issue. Now, NavigateAndReset correctly sets the navigated page as the root page. This also resolved a secondary issue where the page title would flicker, or the navigation button would briefly appear during sync.
Since I’m not yet comfortable contributing via pull requests (yes, I definitely need a proper Git tutorial beyond just add/commit/push 😅), I’m attaching the working code here. So far, I’ve only tested it on Android, and some parts of the code may not even be necessary—I'll verify as I test iOS, macOS, and Windows.
CustomRoutedViewHost.txt
Now, back to my original question.
During this process I discovered two interesting navigation frameworks: Sextant and the newer CrissCross. After reading about both, they seem quite similar in purpose and design.
So here’s what I’d love to know:
What’s the recommended way to implement navigation in ReactiveUI-based projects?
Personally, I like RoutedViewHost—I’ve used it extensively in AvaloniaUI—but I’m also looking to explore more of the frameworks and tools available in ReactiveUI. I also hope to get the You, I, and ReactiveUI book soon to gain deeper insights into the framework in general.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions