Android only allows one navigation page on screen at a time using

后端 未结 1 1793
不知归路
不知归路 2021-01-12 01:33

what is the difference between 2 implementations below?

 public App()
    {
        // The root page of your application
        MainPage = new Views.MainPa         


        
相关标签:
1条回答
  • 2021-01-12 01:52

    I might be a bit confused by what you are asking but if you are doing

    MainPage = new NavigationPage(new MainPage());
    

    And your MainPage is

    public class MainPage : MasterDetailPage
    {
    
        MasterPage masterPage;
        public MainPage()
        {
            masterPage = new MasterPage();
            Master = masterPage;
            Detail = new NavigationPage(new AnotherPage());
    

    Then you are doing

    NavigationPage > MasterDetailPage > NavigationPage

    Either MasterDetail or Navigation should be the root and not have them inside each other. You can't have 2 navigation pages within each other.

    0 讨论(0)
提交回复
热议问题