Bug 58137 - Translucent navigation bar platform-specific no longer works from XAML
Summary: Translucent navigation bar platform-specific no longer works from XAML
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.4
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-07-13 15:55 UTC by David Britch
Modified: 2017-10-05 18:17 UTC (History)
3 users (show)

Tags: ac, ios, platformspecific, navigationpage
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 58137 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description David Britch 2017-07-13 15:55:04 UTC
The NavigationPage.IsNavigationBarTranslucent platform-specific on iOS no longer works when consuming it from XAML. However, when consuming it through C# it works correctly.

Repo: run the sample at https://developer.xamarin.com/samples/xamarin-forms/UserInterface/PlatformSpecifics/

Expected result: As per the screenshot in the doc link: https://developer.xamarin.com/guides/xamarin-forms/platform-features/platform-specifics/consuming/ios/#Making_the_Navigation_Bar_Translucent

Actual result: (1) the button isn't shown, (2) the background colour of the navigation bar isn't set to blue.

I've also tried it in 2.3.5-pre6 and the result is the same.

Note: Setting BarBackgroundColor in XAML does set the background color of the navigation bar, but the platform-specific appears to only work on the BackgroundColor property (confirmed from the C# version of the page).
Comment 1 David Ortinau [MSFT] 2017-07-13 17:01:50 UTC
Thanks David, I can confirm that issue.

Additional Notes:

To view the issue, edit App.xaml.cs to run:  

MainPage = new iOSNavigationPage();

instead of the initial MainPage.

To clarify the issue, the background color of the NavigationPage doesn't appear to be set. You can see the navigation bar shift opacity.