question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Removing the NavBar causes a white field to appear in its place

See original GitHub issue

Description

The page is a ContentPage with a Grid. I have set Shell.BackgroundColor and I have set Shell.NavBarIsVisible="False". On iOS, this leaves a white field in the place where the NavBar used to be: Simulator Screen Shot - iPhone 14 Pro - 2022-11-24 at 15 16 04

If I enable the navbar, the white field goes away - but then I get the text I don’t want to see instead: Simulator Screen Shot - iPhone 14 Pro - 2022-11-24 at 15 16 22

Steps to Reproduce

  1. Create a new MAUI project
  2. Create a ContentPage with a Grid
  3. Set <ContentPage Shell.NavBarIsVisible="False" Shell.BackgroundColor="hotpink" ...other default options/>
  4. Target iOS

Link to public reproduction project repository

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS latest

Did you find any workaround?

Workaround 1

Enable Shell.NavBarIsVisible and set the page as having no title

Workaround 2

Disable SafeArea for iOS devices for particular pages by using platform specific services:

<ContentPage
     ... whatever else you might have here
     xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
     ios:Page.UseSafeArea="False" >

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rachelkangcommented, Apr 12, 2023

This issue appears to have been fixed (I am not able to repro it). I’ve tested on the latest version of the MAUI repo on main, the latest stable release, and even older versions.

image
0reactions
msftbot[bot]commented, Apr 11, 2023

Hi @jkhoel. We have added the “s/try-latest-version” label to this issue, which indicates that we’d like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove white space from the sides and top of my navbar
Show activity on this post. None of the solutions I've were working for me, but I found one that did. In my CSS:...
Read more >
How do I get rid of extra white space between nav
Bootstrap's navbar has padding and possibly margins on the bottom. Try to zero it out. View your site in a good browser like...
Read more >
barTintColor not working in iOS 15
Hi,. When I run the following code in application(_ :didFinishLaunchingWithOptions) in iOS 15, the bar color turns transparent (thus, showing the black ...
Read more >
Remove white space above header containing nav bar ...
All, I'm trying to remove whitespace at above a header containing a nav bar with drop down lists. I've got the top margin...
Read more >
Topic: Parallax issue with Navbar fixed right.
I am building a single page site with the Navbar fixed to the right of the ... it forces a white area in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found