MasterDetailPage - similar to iPad email app

CarloCarlo USMember, University

I am new to Xamarin and am using Xamarin Forms. To learn I am starting with an app that with the UI and Navigation of the iPad email app - list of mailboxes, list of mails from the selected mailbox and the details of the selected email. I started using the MasterDetailPage for the list of emails and the details of the selected email but I am now stuck with the list of mailboxes.

So far I ended up with the list of mailboxes as a separate page that navigates to the MasterDetailPage (list of emails as the master and the selected email details as the details). Not quite what I am aiming for though...

Can the MasterDetailPage be nested? I am thinking something like...
- Master (list of mailboxes)
-- Detail (MasterDetailPage)
--- Master (list of emails of the selected mailbox)
-- Detail (email)

Again, I wanted it looking/behaving like the iPad email app where the "Masters" are the list of mailboxes and list of emails of the selected mailbox that you navigate on the same location/Content area.

Is this something that has been/can be done using Xamarin Forms (XAML)? Help, suggestions and/or samples will greatly be appreciated. Thanks!


  • JasonAwbreyJasonAwbrey USInsider, University, Developer Group Leader mod

    The Master should be a NavigationPage that allows you to drill down from a list of mailboxes to a list of e-mails, which can then be displayed in the Detail

  • CarloCarlo USMember, University

    Thanks @JasonAwbrey‌ for the quick guide. Will explore the NavigationPage. :D

  • CarloCarlo USMember, University


    I made my Master a NavigationPage... the Master pages work but now I couldn't figure out how set the BindingContext of the Detail.

    Just a refresher, I have a MasterDetailPage whose Master is a Navigation Page (list of mailboxes which navigates to the list of emails based on the selected mailbox). From the list of emails I need to pass the selected email as the BindingContext of the Detail page.

    Thanks again!

  • JasonAwbreyJasonAwbrey USInsider, University, Developer Group Leader mod

    Is the problem you don't know how to set the binding, or you don't know how to get a reference to your Detail from inside of of the master-navigation-content stack?

  • CarloCarlo USMember, University

    My problem is how I get a reference to the Detail from the Master ContentPage. Debugging, the ItemTapped event of my ListView of emails I see that "this.Parent.Parent" is my MasterDetailPage. Is this the "common practice/standard" way to get to my Detail page? Thanks!

  • CraigDunnCraigDunn USXamarin Team Xamurai

    You could also use MessagingCenter to post a message from the Master, and listen for it in the Detail.

  • CarloCarlo USMember, University

    Thanks @CraigDunn. The MessageCenter worked great for what I wanted to do.

Sign In or Register to comment.