<FlyoutItem Route="WelcomeFlyout">
<ShellContent Route="Welcome" ContentTemplate="{DataTemplate page:WelcomePage}" />
</FlyoutItem>
<FlyoutItem Route="RegisterFlyout">
<ShellContent Route="Register" ContentTemplate="{DataTemplate page:RegisterPage}" />
</FlyoutItem>
as it was in all pre-releases<10 it should navigate to the register page
exception
@Hasanajouz I wasn't able to trigger this with a timeout exception. Currently we don't support relative routing to other routes because shell doesn't currently support a navigation stack for routes.
If you change the navigation to
C#
Shell.Current.GoToAsync("Register",false);
does that work?
Shell.Current.GoToAsync("Register",false); is exactly what i tried.
I used to route between other routes without navigation.
so If i have two flyout itmes and i want to go to one of them from the other flyout what should i do now?
while Shell.Current.GoToAsync("Register",false); used to work in pre 9
@Hasanajouz wait I copy and pasted the wrong sample apologies
Can you try
C#
Shell.Current.GoToAsync("//Register",false);
@PureWeen yes that worked
Thanks so much.
If you can just give me a link to know where should I use // or / or nothing?
@Hasanajouz Awesome!!
Here's the initial spec for how that all works
https://github.com/xamarin/Xamarin.Forms/issues/5790
We're still getting the behavior for pushing routes on to the stack all finished though. The syntax you initially have will work in upcoming versions
Given the 4.2 RC releases, can we expect this as part of 4.3+?
Follow up question @PureWeen -- since routes aren't pushed on to the stack at this time, what is the suggested approach for back button behavior? Do Shell apps need to maintain their own internal queue by hooking in to Shell.OnNavigated that can be popped as needed?
Currently in our application when attempting to invoke default back button behavior, the application crashes. I'm fairly certain all of the routes are being correctly defined (mix of Xaml and RegisterRoute), and invoked via GoToAsync or visual navigation. All of the documentation, ex: here, seems to suggest default back behavior just works. However, some of the comments in doc issues, ex MicrosoftDocs/xamarin-docs#1401, suggest that's not necessarily the case.
At this point, I'm unclear if this is an issue with our application, an issue with documentation, a framework issue, or some mix of the three.
Most helpful comment
@Hasanajouz Awesome!!
Here's the initial spec for how that all works
https://github.com/xamarin/Xamarin.Forms/issues/5790
We're still getting the behavior for pushing routes on to the stack all finished though. The syntax you initially have will work in upcoming versions