Setting NavigationPage.HasNavigationBar="False" on modally presented NavigationPage causes top padding on iOS #24972
Labels
area-controls-modal
area-navigation
NavigationPage
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
platform/iOS 🍎
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
If you push a modal page (
new NavigationPage(new FooPage())
) and setNavigationPage.HasNavigationBar="False"
there is a small top padding applied to the content page. This padding is not present when the navigation bar is being displayed.Originally I thought this was an issue caused somewhere in prism (see #3064) however after upgrading to the latest maui controls & workloads version (8.0.91 controls, 8.0.82/8.0.400.2 workloads) I have noticed the issue got worse (the padding required has gone from 5px to 8px). I have been able to reproduce, in my reproduction the base page has no padding & the modal does:
Landing - non modal page
Modal page, the thin like between the yellow & green should not be there
Steps to Reproduce
NavigationPage.HasNavigationBar="False"
Link to public reproduction project repository
https://github.com/Axemasta/NavigationBarPaddingRepro
Version with bug
8.0.91 SR9.1
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16+
Did you find any workaround?
Set a negative top padding of
-8px
:Relevant log output
No response
The text was updated successfully, but these errors were encountered: