[FIXED] How can I avoid showing the sidebar on login?

Issue

I´m using Xamarin forms and I’m unable to prevent that the sidebar is shown on Login.

I tried this on my LoginPage.xaml:

    Shell.NavBarIsVisible="False"
    Shell.FlyoutItemIsVisible="False"
    protected override void OnAppearing()
            {
                base.OnAppearing();
                Shell.SetTabBarIsVisible(this, false);
                Shell.SetNavBarIsVisible(this, false);
                //AppShell.Current.remo();
            }
       
            protected override void OnDisappearing()
            {
                base.OnDisappearing();
                Shell.SetTabBarIsVisible(this, true);
                Shell.SetNavBarIsVisible(this, true);
            }

Can anyone help me?

Solution

If by side bar you mean the Shell flyout then add below line in your login page xaml

Shell.FlyoutBehavior="Disabled"

Docs: Shell flyout-behavior

Answered By – Cfun

Answer Checked By – Mary Flores (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published