locked
One MasterDetailPage for all pages in my app RRS feed

  • Question

  • User369898 posted

    I have a Master Detail Page and i want to reach that page from all other pages. I achieve that for one page but i want to see that page from all other pages. For example i want to go to first page from my last page in my app and i dont prefer back button so i can go to first page with one click.

    My Master detail Page:

    public MyMasterDetailPage()
        {
            InitializeComponent();
    
            Icon = "xamarin.png";
    
            Detail = new NavigationPage(new MyMasterDetailPageDetail()); //This direct to only one page and i have to do this dynamicly for my purpose.
    
            Master = new MyMasterDetailPageMaster();
    
            MasterBehavior = MasterBehavior.Popover;
        }
    

    My very simple master page design:

     <StackLayout>
      <Label Text="Main page"/>
     </StackLayout>
    

    How can i do that?

    Wednesday, July 4, 2018 11:40 AM

Answers

  • User359751 posted

    you can change detail page as like this Detail = new NavigationPage(new DemoPage()); now you just change detail page to that page you like to call.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, July 5, 2018 9:40 AM

All replies

  • User359751 posted

    @ramazan May be you can achieve this through change DetailPage on all next button and set the nxt page as a detail page

    Wednesday, July 4, 2018 11:56 AM
  • User369898 posted

    @SHUBHAMSHARMA_2927 very thanks. Teorically i need your suggestion but dont know how? Any idea how to do it? What i am trying now is make a base class for masterdetail page and call that class where you need.

    Thursday, July 5, 2018 6:07 AM
  • User359751 posted

    you can change detail page as like this Detail = new NavigationPage(new DemoPage()); now you just change detail page to that page you like to call.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, July 5, 2018 9:40 AM