0
votes

When we login,I dont want to display top bar in login_page,from second_page after login I would like to display slide menu.Is it possible to display slide from second page in xamarin.forms?

public class RootPage : MasterDetailPage { public RootPage() { var menuPage = new MenuPage();

        menuPage.Menu.ItemSelected += (sender, e) => NavigateTo(e.SelectedItem as MenuItem);

        Master = menuPage;
        Detail = new NavigationPage(new DashBoardPage());

    }

    void NavigateTo(MenuItem menu)
    {
        Page displayPage = (Page)Activator.CreateInstance(menu.TargetType);

        Detail = new NavigationPage(displayPage);

        IsPresented = false;
    }
}

In App.cs i am using loginpage and in loginpage i dont want ot display top menu.after login i want to display.how to display after login page

public static Page GetMainPage() {

            return new LoginPage();

    }
1

1 Answers

0
votes

Finally i got the solution for this question:

use: await Navigation.PushModalAsync(new RootPage());

in place of await Navigation.PushAsync(new RootPage());