Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dark Mode] TextBox and MaskTextedBox Control backcolor is not dark When set the readonly property is true #11894

Open
MelonWang1 opened this issue Aug 16, 2024 · 1 comment
Labels
area-DarkMode Issues relating to Dark Mode feature

Comments

@MelonWang1
Copy link
Contributor

MelonWang1 commented Aug 16, 2024

.NET version

.NET SDK 9.0.100-rc.1.24415.1 + build private dll form winforms repo release/9.0 branch

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

This is a new feature Dark Mode: #11857.

Issue description

TextBox and MaskTextedBox Control backcolor is not dark when set the readonly property is true.
readonly

Steps to reproduce

  1. Create a WinForms .NET Core application
  2. Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in program.cs file.
  3. Add a TextBox and MaskTextedBox Control and set their readonly property to true.
  4. Run the application.
  5. Observe the result.
@MelonWang1 MelonWang1 added the untriaged The team needs to look at this issue in the next triage label Aug 16, 2024
@KlausLoeffelmann
Copy link
Member

KlausLoeffelmann commented Aug 17, 2024

That's a tricky one, which could be somewhat easily addressed.
For now the workaround would be to test, if the control is in Darkmode and in ReadOnly, and then set the color accordingly.
This needs discussion, which colors would be appropriate to use here, and we should schedule this for .NET 10.

@lonitra lonitra added the area-DarkMode Issues relating to Dark Mode feature label Aug 20, 2024
@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DarkMode Issues relating to Dark Mode feature
Projects
None yet
Development

No branches or pull requests

4 participants