dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.02k stars 1.73k forks source link

[BUG] Back button is not visible on the navigation bar in light mode #20811

Closed RsZoli closed 6 months ago

RsZoli commented 7 months ago

Description

After navigating from a page, the back button is not visible (or presumably just white) if the device is in light mode! The bug is present on Android and iOS platforms as well, but the navigation itself is working!

IMG_0006 IMG_0007 Screenshot_20240223_140518 Screenshot_20240223_140536

In dark mode, the back button is visible!

Steps to Reproduce

Create a new .NET MAUI application and navigate from the MainPage.

Link to public reproduction project repository

https://github.com/RsZoli/GitHubRepros

Version with bug

8.0.6 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

iOS 16.2, iOS 17.2.1, Android 13, Android 14

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 7 months ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

GlacierFox commented 6 months ago

Same issue here. Can't change the color of my custom back icon from white to anything else.

XamlTest commented 6 months ago

Verified this on VS 17.10.0 Preview 2.0(8.0.14). Repro on Android 14.0-API34 and iOS 17.2 with below Project: GitHubRepros.zip

japarson commented 6 months ago

This bug has been fixed by https://github.com/dotnet/maui/pull/20152. The fix will be automatically present in newly created MAUI projects. To integrate it into an existing project, replace the existing Shell.ForegroundColor property in Resources\Styles\Styles.xaml with the following:

<Setter Property="Shell.ForegroundColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource SecondaryDarkText}}" />