popo
popo

Reputation: 71

How can I avoid showing the sidebar on login?

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?

Upvotes: 0

Views: 124

Answers (1)

Cfun
Cfun

Reputation: 9721

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

Upvotes: 1

Related Questions