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.03k stars 1.73k forks source link

ToolbarItem font icon color not updating with AppThemeBinding #23201

Closed CodingOctocat closed 2 weeks ago

CodingOctocat commented 3 months ago

Description

ToolbarItem Icon Color Not Updating with AppThemeBinding

<ToolbarItem Text="Search">
    <ToolbarItem.IconImageSource>
        <FontImageSource FontFamily="SegoeFluentIcons"
                         Glyph="&#xE721;"
                         Color="{AppThemeBinding Light={StaticResource Black},
                                                 Dark={StaticResource White}}" />
    </ToolbarItem.IconImageSource>
</ToolbarItem>

Light mode now: image

Toggle to dark mode: image

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android API 34

Did you find any workaround?

Use file icon

IconImageSource="{AppThemeBinding Light='search_light.svg',
                                  Dark='search_dark.svg'}"

Relevant log output

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Zhanglirong-Winnie commented 3 months ago

This issue can be reproduced on Visual Studio 17.11.0 Preview 2.1 (8.0.40 and 8.0.21).