Skip to content

Unable to change color of BackButton icon in Shell #11127

@Sebosek

Description

@Sebosek

Description

One can set Shell.ForegroundColor but the color is not applied to the back button icon.

<Style TargetType="Shell" ApplyToDerivedTypes="True">
    <Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray950}}" />
    <Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
</Style>

With the following color settings

<Color x:Key="Primary">#625C40</Color>
<Color x:Key="Secondary">#FCF7E3</Color>
<Color x:Key="Base">#FEFCF6</Color>

Results into the following, see the white color of the back button icon.

image

Steps to Reproduce

STR:

  1. Create an MAUI app
  2. Add a page, and set the title of that page
  3. Register the new page in shell and make it accessible from the app (via button, for example)
  4. Change "TitleColor" style for the shell (Resources/Styles/Styles.xaml) to any color different from white.
  5. Launch the app on Android and open the new page, the title color is changed, but the back icon color is white.

Expected behavior:

  1. The back icon color is the same as title color

Link to public reproduction project repository

https://github.com/Sebosek/MAUI.IconColorBug

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyoutplatform/androids/triagedIssue has been revieweds/try-latest-versionPlease try to reproduce the potential issue on the latest public versiont/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions