So I have a xamrain forms Shell app that is not showing its back button
I have the App.cs here showing you how the shell is linked in.
public partial class App : Application
{
public App()
{
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("removed for security");
DevExpress.XamarinForms.Editors.Initializer.Init();
DevExpress.XamarinForms.DataGrid.Initializer.Init();
RaygunClient.Init("removed for security");
RaygunClient.Current.EnableCrashReporting();
InitializeComponent();
// MainPage = new NavigationPage(new LoginPage());
MainPage = new AppShell();
}
}
My App Shell
<?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="clr-namespace:THEHOCKEYLAB.Views"
Title="THEHOCKEYLAB"
x:Class="THEHOCKEYLAB.AppShell"
FlyoutBehavior="Flyout"
FlyoutHeaderBehavior="Fixed"
BackgroundColor="#121212">
<!--
The overall app visual hierarchy is defined here, along with navigation.
https://learn.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell/
-->
<Shell.Resources>
<ResourceDictionary>
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.BackgroundColor" Value="{StaticResource Primary}" />
<Setter Property="Shell.ForegroundColor" Value="White" />
<Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" />
<Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" />
<Setter Property="Shell.TabBarBackgroundColor" Value="{StaticResource Primary}" />
<Setter Property="Shell.TabBarForegroundColor" Value="White"/>
<Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF"/>
<Setter Property="Shell.TabBarTitleColor" Value="White"/>
</Style>
<Style TargetType="TabBar" BasedOn="{StaticResource BaseStyle}" />
<Style TargetType="FlyoutItem" BasedOn="{StaticResource BaseStyle}" />
</ResourceDictionary>
</Shell.Resources>
<Shell.FlyoutHeaderTemplate>
<DataTemplate>
<Grid BackgroundColor="{StaticResource Primary}" Padding="20">
<Label Text="The Hockey Lab"
TextColor="White"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
</Grid>
</DataTemplate>
</Shell.FlyoutHeaderTemplate>
<FlyoutItem Title="Checkin" Icon="cal.png">
<ShellContent ContentTemplate="{DataTemplate local:CheckInPage}"/>
</FlyoutItem>
<FlyoutItem Title="Bike WorkOut Listings" Icon="bike.png">
<ShellContent ContentTemplate="{DataTemplate local:BikePage}"/>
</FlyoutItem>
<FlyoutItem Title="Sessions Listings" Icon="time.png">
<ShellContent ContentTemplate="{DataTemplate local:SessionPage}"/>
</FlyoutItem>
<FlyoutItem Title="Weights Lifting Listings" Icon="weights.png">
<ShellContent ContentTemplate="{DataTemplate local:WeightLiftingPage}"/>
</FlyoutItem>
<MenuItem Text="Settings" IconImageSource="settings.png" Command="{Binding SettingsCommand}" />
<FlyoutItem Title="About" Icon="icon_about.png">
<Tab Title="Home">
<ShellContent Route="Home" ContentTemplate="{DataTemplate local:AdminMenuPage}" />
</Tab>
<Tab Title="Weight Lifting">
<ShellContent Route="WeightLifting" ContentTemplate="{DataTemplate local:WeightLiftingPage}" />
</Tab>
</FlyoutItem>
<FlyoutItem Title="Browse" Icon="icon_feed.png">
<ShellContent Title="page_1" Route="ItemsPage" ContentTemplate="{DataTemplate local:AdminMenuPage}" />
</FlyoutItem>
<TabBar>
<ShellContent Title="Home" Icon="icon_about.png" ContentTemplate="{DataTemplate local:AdminMenuPage}" />
<ShellContent Title="Settings" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:SettingsPage}" />
</TabBar>
<!--
If you would like to navigate to this content you can do so by calling
await Shell.Current.GoToAsync("//LoginPage");
-->
<TabBar>
<ShellContent Route="LoginPage" ContentTemplate="{DataTemplate local:LoginPage}" />
<ShellContent Title="Settings" Icon="icon_feed.png" ContentTemplate="{DataTemplate local:SettingsPage}" />
</TabBar>
<!-- When the Flyout is visible this will be a menu item you can tie a click behaviour to -->
But for some reason, my back button is not showing at all. I am using xf forms version 5.0.0.2196
Also, how does one get a login route to work properly when using shell.