Can i load other page inherited from tabbedpage inside mainpage

pnet1pnet1 USMember ✭✭✭✭

I'm having some difficult to run Mainpage because it inherits from TabbedPage. For example, to create a menu(Hamburger Menu) i'm having difficult, to show NavigationBar. Then i thought is there how to load other page inside the mainpage and this page inherited from tabbedpage? I would let the mainpage free. Is possible? How can i do?

Tagged:

Best Answer

  • pnet1pnet1 USMember ✭✭✭✭
    Accepted Answer

    This code solved my issue. This was posted by @JoeManke. I'll go to mark this answer.

    Application.Current.MainPage = new MasterDetailPage
     {
           Master = new Master(),
           Detail = new TabbedPage
           {
                    Children =
                    {
                            new NavigationPage(new Indicadores()){ Title = "Indicadores"},
                            new NavigationPage(new PaineisPage()){ Title = "Painéis"}
                     }
              }
     };
    

Answers

  • CharwakaCharwaka INMember ✭✭✭✭

    Have you tried PushModalAsync();

  • pnet1pnet1 USMember ✭✭✭✭
    edited February 13

    @Charwaka i didn't try. Today i have a MainPage inherited from TabbedPage. It is making my life difficult. Then i thought if i create other page inherited from tabbedpage to continue my project and i would let the mainpage free to create a Menu, NavigationBar(i need it) but in this moment i didn't try nothing yet. PushModalAsync() i didn't understand? How did it work?

  • CharwakaCharwaka INMember ✭✭✭✭

    @pnet1 said:
    @Charwaka i didn't try. Today i have a MainPage inherited from TabbedPage. It is making my life difficult. Then i thought if i create other page inherited from tabbedpage to continue my project and i would let the mainpage free to create a Menu, NavigationBar(i need it) but in this moment i didn't try nothing yet. PushModalAsync() i didn't understand? How did it work?

    i'm sorry i didn't red you question properly , PushModalAsync() wont work in this case

  • pnet1pnet1 USMember ✭✭✭✭
    Accepted Answer

    This code solved my issue. This was posted by @JoeManke. I'll go to mark this answer.

    Application.Current.MainPage = new MasterDetailPage
     {
           Master = new Master(),
           Detail = new TabbedPage
           {
                    Children =
                    {
                            new NavigationPage(new Indicadores()){ Title = "Indicadores"},
                            new NavigationPage(new PaineisPage()){ Title = "Painéis"}
                     }
              }
     };
    
Sign In or Register to comment.