Can only ignore iOS Safe Area when navigation bar is hidden #17022
Labels
area/layout 🔲
StackLayout, GridLayout, ScrollView, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
fixed-in-8.0.7
fixed-in-8.0.10
fixed-in-8.0.14
fixed-in-9.0.100-preview.1.9973
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
p/1
Work that is critical for the release, but we could probably ship without
partner/cat 😻
Client CAT Team
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
Porting an Xamarin.Forms app to .NET MAUI, I found that the old safe area code doesn't work as expected in .NET MAUI. I found the recommendation to use
IgnoreSafeArea="True"
on the layout, however this didn't do anything until...I did a repro in a blank app and hid the navigation bar.
PlayItUnsafe.zip
This AppDelegate code should (used to) make the nav bar bg transparent to create this look.
The SmartHotel360 app uses FlyoutPage and the sample repro uses Shell. Both should work.
Steps to Reproduce
run the sample from the zip and/or the repo linked. Show/hide the navigation bar. In both cases the content should be at the very top of the device screen, not at the bottom of the nav bar.
Link to public reproduction project repository
https://github.com/davidortinau/SmartHotel360-Mobile/blob/upgrade-step-1/Source/SmartHotel.Clients/SmartHotel.Clients.iOS/AppDelegate.cs
Version with bug
8.0.0-preview.7.8842
Also tested latest 7.0
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
16.4
Did you find any workaround?
Not without abandoning the existing implementation with ToolbarItem and flyout menu button etc.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: