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.

MasterDetailPage & NavigationPage

senzsenz DEMember


I try to implement a Navigation using the MasterDetailPage.

This code is used in my App.cs:

public static NavigationPage Navigation;
public App()
    Navigation = new NavigationPage(new MainView());

   var mdPage = new MasterDetailPage();
   mdPage.Detail = Navigation;
   mdPage.Master = new NavigationView();

   MainPage = mdPage;

On the first page (MainView) the MD is working fine. But when I click a link on my MasterPage (NavigationView) with the following code:

async void onNextPageClick()
    await App.Navigation.PushAsync(new DemoView());

the DemoView shows correctly up, but my MD-Page in the navigationbar turned in a functional back button and the MasterPage won't close automatically.

Could anyone help please?

Best Answer


Sign In or Register to comment.