Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[Bug] ios:NavigationPage.IsNavigationBarTranslucent can't be changed dynamically

Open acuntex opened this issue 4 years ago • 0 comments

Description

ios:NavigationPage.IsNavigationBarTranslucent cannot be change dynamically during the lifetime of a NavigationPage. Although there is a call to UpdateTranslucent() in HandlePropertyChangedof NavigationRenderer, this call only sets NavigationBar.Translucent = NavPage.OnThisPlatform().IsNavigationBarTranslucent(); which does not seem to be enough.

There were a few fixes in https://github.com/xamarin/Xamarin.Forms/pull/659 but these fixes only work during the start of a page, it does not affect any changes after the page already appeared.

Steps to Reproduce

  1. Bind ios:NavigationPage.IsNavigationBarTranslucent to a property and change it or use the static method to change the translucent state.

Expected Behavior

The content page is underneath the navigation bar.

Actual Behavior

The content page remains where it is and is sticking to the bottom of the NavigationBar.

Basic Information

  • Version with issue: 4.8.0.1821
  • Last known good version: -
  • Platform Target Frameworks:
    • iOS: 14
  • NuGet Packages: Xamarin.Forms
  • Affected Devices: iOS Devices

Environment

Build Logs

Screenshots

Reproduction Link

Workaround

No known workaround. But if it doesn't get fixed in the near future, it would be nice if Microsoft would update the documentation (https://docs.microsoft.com/de-de/xamarin/xamarin-forms/platform/ios/navigation-bar-translucent) with a remark that it is buggy so that developers don't waste much time in trying to implement something that can't work.

acuntex avatar Dec 21 '20 15:12 acuntex