0
votes

I have a tab page i've set to the main page in xamarin forms:

 App.Current.MainPage = new MainPage();

MainPage is a tabbed page:

public partial class MainPage : TabbedPage
    {....

Within the tabbedPage there is a content page, which has a button click to load a MasterDetail View:

 await Navigation.PushAsync(new AttendMasterPage(new AttendanceViewModel(item)));

This works ok, but the masterdetail view is loaded within the tabbed page. so when i use Navigation.PopAsync(); on the Detail page once finished, nothing happens.

I need the page to go back to the original content page on the tabbed control using a button idealy.

Hope this makes sense, any more info needed please let me know

1

1 Answers

1
votes

A MasterDetailPage is designed to be a root page, and using it as a child page in other page types could result in unexpected and inconsistent behavior. In addition, it's recommended that the master page of a MasterDetailPage should always be a ContentPage instance, and that the detail page should only be populated with TabbedPage, NavigationPage, and ContentPage instances. This will help to ensure a consistent user experience across all platforms.

Source: official doc

Please get familiar with the official documentation in order to prevent such problems.