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
22k stars 1.72k forks source link

Button text color doesn’t change on pressed using Style iOS #20836

Open prabhavmehra opened 6 months ago

prabhavmehra commented 6 months ago

Description

Button text color doesn’t change to the correct color set using Style in ResourceDictionary for Pressed.

Steps to Reproduce

  1. Create a maui app.
  2. In the ResourceDictionary set the button text color
     <VisualState x:Name="Pressed">
                        <VisualState.Setters>
                            <Setter Property="TextColor" Value=“Green" />
                        </VisualState.Setters>
                    </VisualState>
  3. On button pressed it shows grey color.

Link to public reproduction project repository

Repro

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

8.0.6 SR1

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

prabhavmehra commented 6 months ago

this makes it verify difficult for accessibility and theming, as in dark mode the text is almost non readable.

ghost commented 6 months ago

Hi @prabhavmehra. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

prabhavmehra commented 6 months ago

Repro added

Zhanglirong-Winnie commented 6 months ago

Verified this issue with Visual Studio 17.10.0 Preview 2. Can repro on iOS platform with sample project. image