Home > Back-end >  How can I avoid showing the sidebar on login?
How can I avoid showing the sidebar on login?

Time:09-14

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?

CodePudding user response:

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

  • Related