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.