xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] [iOS] [Shell] Setting NavigationPage.HideNavigationBarSeparator to True no longer has an effect #15020

Open CMarcher opened 2 years ago

CMarcher commented 2 years ago

Description

When setting the iOS specific NavigationPage property, HideNavigationBarSeparator, to True, the separator is still visible if it is a NavigationPage within a Shell page. The property still works if using a NavigationPage not embedded in a Shell page.

Steps to Reproduce

  1. Create a new Xamarin Forms application with a Shell page and at least one page embedded.

  2. Set Shell.BackgroundColor to White and ensure the embedded page has a white background as well.

  3. In App.xaml, copy this into resources:

            <Style TargetType="NavigationPage">
                <Setter Property="BarTextColor" Value="Black"/>
                <Setter Property="ios:NavigationPage.HideNavigationBarSeparator" Value="True"/>
            </Style>
  4. Add this namespace to your Application header.

    xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
  5. Run the app on an iOS device or simulator. See that the separator is visible.

Expected Behavior

The separator is hidden if this property is set to True.

Actual Behavior

The separator is visible regardless.

Basic Information

Environment

Show/Hide Visual Studio info ``` === Visual Studio Community 2019 for Mac === Version 8.10.16 (build 2) Installation UUID: 946eb12b-9105-496e-a053-833549dae35b GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638) Package version: 612000162 === Mono Framework MDK === Runtime: Mono 6.12.0.162 (2020-02/2ca650f1f62) (64-bit) Package version: 612000162 === Roslyn (Language Service) === 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb === NuGet === Version: 5.9.0.7134 === .NET SDK (x64) === SDK: /usr/local/share/dotnet/sdk/6.0.101/Sdks SDK Versions: 6.0.101 5.0.404 5.0.401 5.0.302 5.0.301 5.0.203 5.0.202 5.0.201 5.0.103 3.1.416 3.1.413 3.1.411 3.1.410 3.1.409 3.1.408 3.1.407 3.1.406 MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks === .NET Core Runtime === Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.1 5.0.13 5.0.10 5.0.8 5.0.7 5.0.6 5.0.5 5.0.4 5.0.3 3.1.22 3.1.19 3.1.17 3.1.16 3.1.15 3.1.14 3.1.13 3.1.12 === .NET Core 3.1 SDK === SDK: 3.1.416 === .NET 5.0 SDK === SDK: 5.0.404 === Xamarin.Profiler === Version: 1.6.15.68 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler === Updater === Version: 11 === Xamarin.Android === Version: 12.0.0.3 (Visual Studio Community) Commit: xamarin-android/d16-11/f0e3c2d Android SDK: /Users/[user]/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: None installed SDK Tools Version: 26.1.1 SDK Platform Tools Version: 30.0.4 SDK Build Tools Version: 30.0.2 Build Information: Mono: c633fe9 Java.Interop: xamarin/java.interop/d16-11@476bb5b ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.35.4@85460d3 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-11@87af37b === Eclipse Temurin JDK === Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL === Android SDK Manager === Version: 16.10.0.13 Hash: 1b81df5 Branch: remotes/origin/d16-10 Build date: 2021-11-12 01:17:32 UTC === Android Device Manager === Version: 16.10.0.15 Hash: 89dcc0b Branch: remotes/origin/d16-10 Build date: 2021-11-12 01:17:52 UTC === Xamarin Designer === Version: 16.11.0.39 Hash: cd672761d Branch: remotes/origin/d16-11 Build date: 2021-10-06 21:09:18 UTC === Apple Developer Tools === Xcode 13.2.1 (19586) Build 13C100 === Xamarin.Mac === Version: 8.4.0.0 (Visual Studio Community) Hash: 8fc41ae82 Branch: xcode13.2 Build date: 2021-12-09 01:07:56-0500 === Xamarin.iOS === Version: 15.4.0.0 (Visual Studio Community) Hash: 8fc41ae82 Branch: xcode13.2 Build date: 2021-12-09 01:07:56-0500 === Build Information === Release ID: 810160002 Git revision: 6dbc7886fa608147f685a7df3912249400c84716 Build date: 2021-12-14 15:54:37-05 Build branch: release-8.10 === Operating System === Mac OS X 12.0.1 Darwin 21.1.0 Darwin Kernel Version 21.1.0 Wed Oct 13 17:33:23 PDT 2021 root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64 ```

Screenshots

Screen Shot 2022-01-04 at 4 07 54 PM

Reproduction Link

Workaround

If you so desperately need the separators to be invisible while using Shell, you'll have to settle with pushing a new NavigationPage on top of the Shell page.

pawelt94 commented 2 years ago

Is there any solution?

justintemplar commented 2 years ago

This is still a thing. Can we get a solution?