My Xamarin Shell application has a flyout defined as follow:
<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="..."
xmlns:viewModels="..."
x:Class="...">
<FlyoutItem x:Name="A1" FlyoutDisplayOptions="AsMultipleItems">
<ShellContent x:Name="a1">
<local:Homepage/>
</ShellContent>
</FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent Route="Settings" ContentTemplate="..." />
</FlyoutItem>
<FlyoutItem x:Name="LoginFlyoutItem" FlyoutDisplayOptions="AsMultipleItems">
<ShellContent x:Name="Login" Route="Login" ContentTemplate="..." />
</FlyoutItem>
</Shell>
I want the Login page to perform a navigation to the a1 page after the user logs in with an
await Shell.Current.GoToAsync(nameof(Homepage));
The issue is that the a1 page shows the back button on the top left corner when opened, but I want it to show the normal hamburger icon to open the flyout. I would expect the back button when using the PushAsync() method, but not using the GoToAsync() one. I don’t want the a1 page to be considered a “child” of the login page, but I simply want the view model to navigate to the a1 page. How can I accomplish that?