dotnet / dotnet/winforms

[Dark Mode] The color contrast for selected DataGridViewTextBox is insufficient

Open
#13,780 0 comments 0 reactions 1 assignee Claimed by @LeafShi1 View on GitHub
area-DarkMode
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

.NET 10 SDK build: 10.0.100-rc.1.25401.103

### Did it work in .NET Framework?

Not tested/verified

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

Occurs when DarkMode feature involved

### Issue description

When the application is in Dark Mode, the color contrast of DataGridViewTextBox is insufficient.
This issue does not occur in Classic Mode.

Image

### Steps to reproduce

1. Create Winforms .NET application with targeting .NET 10
2. Add a DataGridView control with DataGridViewTextBoxColumn in form designer
3. Set app under Dark mode in program.cs file:
```
#pragma warning disable WFO5001
Application.SetColorMode(SystemColorMode.Dark);
#pragma warning restore WFO5001
```
4. Build and run project
5. Input something in DataGridViewTextBox, then select this cell
6. Observe the color contrast between selected DataGridViewTextBox's Text color and Back color

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.