question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to replace the whole navigation stack during the navigation

See original GitHub issue

At the outset, would like to appreciate the effort that’s being made to make this AppModel alive by adding features to it.

And while trying the preview NuGet package (0.9.2-preview), came across this issue.

This is being generic Shell definition used across many projects with both Flyout items and Tab (meant to be hidden from the flyout menu and invoked on demand like the Login page).

But when such is definition is used with this Blazor Bindings model, navigating to the Tab defined page opens up with the Flyout menu still open and that page is pushed onto the Navigation stack as a back button is still present. Need a way to define Attached Properties to make this a Modal page.

And the next part of the issue is while moving from the Tab page to any other page, behaves like a usual regular Navigation page. pushed onto the stack. The intended behavior is to replace the entire Navigation stack and start afresh.

This feature needs to be added in this AppModel on how to start navigation afresh (maybe with additional parameters to the NavigateToAsync method as the underlying Native Shell implementation does support that feature with route address ///home).

Screenshots:

Tab page with Flyout menu still open:

maui-blazor-bindings-tab-page-open-flyout

Tab page with back button:

maui-blazor-bindings-tab-page-back-button

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Dreamescapercommented, Oct 21, 2022

Btw, most of the Shell attached properties are supported (with no IntelliSense though), you can take a look here for an example.

I hope to improve that experience in scope of this item.

0reactions
egvijayanandcommented, Oct 21, 2022

Adding a Login page as another Flyout item and its visibility controlled by a property is definitely a good idea. Have made use of this approach in XAML but with Shell routing. Will try this way.

Thanks for the sample page for making use of the Attached properties. Have tried with Native control property, but not much progress.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resetting the navigation stack for the home screen (React ...
I've build a StackNavigator inside of a DrawerNavigator, and the navigation between home screen and other screens is working. But the problem is ......
Read more >
StackActions reference
The replace action allows to replace a route in the navigation state. It takes the following arguments: name - string - A destination...
Read more >
STOP Using Navigation Stack in SwiftUI! Use THIS Instead...
This navigation stack will allow you to add a hierarchical navigation system to your app using a simple and easy to use class....
Read more >
How to Remove Previous Screen From Navigation Stack in ...
Check out on udemy: https://bit.ly/3vbA1LX In this video you will learn how to remove previous screen from then navigation stack inside ...
Read more >
Why You Should NEVER Use Navigation Stack ... - YouTube
Why You Should NEVER Use Navigation Stack ! ... This Surprising Alternative Will Change Everything! Join SwiftUI Nation today and get access ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found