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.26k stars 1.76k forks source link

[9.0] [iOS] [Regression] - ToolbarItem color when used with IconImageSource is always white. #25912

Open DevDachi opened 3 days ago

DevDachi commented 3 days ago

Description

In Maui 9 on iOS, ToolbarItem color when used with IconImageSource is always white. In Maui 8, we can set any color we want.

Steps to Reproduce

  1. Add a toolbar item to a page. e.g.

    <ContentPage.ToolbarItems>
        <ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImage Glyph='+', Color=Green, Size=22}" />
    </ContentPage.ToolbarItems>
  2. Build and run the app on iOS

Actual: The Icon color is white Expected: The Icon color should be green (or whatever we set)

The following sample can used to repro this issue. This icon color is white on white toolbar; hence not visible.

https://github.com/dotnet/maui-samples/tree/main/9.0/Tutorials/ConvertToMvvm

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/tree/main/9.0/Tutorials/ConvertToMvvm

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.100 SR10

Affected platforms

iOS, macOS

Affected platform versions

iOS 17, 18

Did you find any workaround?

No

Relevant log output

Zhanglirong-Winnie commented 2 days ago

This issue has been verified using Visual Studio 17.13 Preview 1(9.0.10 & 9.0.0 & 8.0.100). Can repro this issue on iOS platform. And 8.0.100 works fine.