Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to navigate from a ContentPage to a TabbedPage by clicking for example on a connection button?

I take the example of a login page. The login page is in a ContentPage and once the user is logged in I want to redirect him to a TabbedPage.

Best Answer

  • JarvanJarvan Member, Xamarin Team Xamurai
    Accepted Answer

    How to navigate from a ContentPage to a TabbedPage

    To navigate from a ContentPage to a TabbedPage, you could specify App.Current.MainPage to change the root page.

    private async void btn_Clicked(object sender, EventArgs e)
    {
        App.Current.MainPage = new TabbedPage1();
    }
    

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    Accepted Answer

    How to navigate from a ContentPage to a TabbedPage

    To navigate from a ContentPage to a TabbedPage, you could specify App.Current.MainPage to change the root page.

    private async void btn_Clicked(object sender, EventArgs e)
    {
        App.Current.MainPage = new TabbedPage1();
    }
    
Sign In or Register to comment.