Manual Page Navigation Displays Page Incorrectly

dswdsw Member ✭✭

Some of the pages in my Xamarin app are tabbed pages - navigation between these pages (using the tabs) works perfectly.

However, some of my pages are not accessible via the tabs, for example, I am displaying a list of items, and clicking on one of the items take you to a detail page for the list item that was clicked. This is handled in the cs code behind for the list page, and navigation is triggered using this:

await Navigation.PushAsync(new DetailPage(DetailPageViewModel)); 

This works, in that it does take you to the detail page, but the page is cut off, and only the lower part of the detail page can be seen - the top half of the page is not displayed and cannot be scrolled to. It only seems to be a problem with iOS, Android does not show the same issue.

Is this a known bug, or am I doing something wrong?

I'm using Xamarin Forms 4.1.0.581479

Tagged:

Best Answer

Answers

  • dswdsw Member ✭✭

    @LandLu said:
    Do you mean the content is overlapped by your navigation bar on iOS?
    Try to enable the safe area on iOS using the code below:

    On<iOS>().SetUseSafeArea(true);
    

    Yep, that was it, thanks!

Sign In or Register to comment.