dotnet / dotnet/winforms

Testing result of Pull Request #15075 Fix DataGridView ComboBox and Button cell rendering in dark mode

Open
#15,082 0 comments 0 reactions 1 assignee Claimed by @LeafShi1 View on GitHub
internal-validation
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

Performed re-validation for the GitHub PR #15075 related to Dark Mode support for DataGridViewComboBoxColumn and DataGridViewButtonColumn.

- The issue #15077 which has been resolved. Both DataGridViewComboBoxColumn and DataGridViewButtonColumn now correctly adopt Dark Mode styling, as shown in the screenshots below.

Image

### - **During validation, verified previous discovered issues:**
**1. Unreadable Colors in ComboBox Cells** -- **Fixed**
After set DataGridViewComboBoxColumn's DisplayStyle as DataGridViewComboBoxDisplayStyle.ComboBox and FlatStyle as System/Standard, the BackColor and ForeColor are unreadable
Image

**2. Row and Column Headers Do Not Follow Dark Mode Theme** -- **Not Fixed**
When EnableHeadersVisualStyles = True is set in the PropertyGrid, the DataGridView row and column headers do not adopt Dark Mode colors

https://github.com/user-attachments/assets/d88f7e17-9191-40c3-9aac-baa871226ca6

**3.Unexpected Blue Background on Button Click** -- **Fixed**
For a DataGridViewButtonColumn with FlatStyle = System, clicking the button causes an unexpected blue background color to appear

Image

**4. Insufficient Contrast for Focus Indicators** -- **Fixed**
The dotted focus rectangle does not provide sufficient contrast in Dark Mode for the following DataGridView cell types: Image/ComboBox/CheckBox/Button

Image

**5. Missing Selection Border for Button Cells** --**Not Fixed well**
Selected DataGridViewButton cells do not display an appropriate border or visual highlight, making the selection state difficult to distinguish in Dark Mode.

- The border line is too thick when using mouse hover on DataGridViewButton
- The DataGridViewButton no state changes when using more hover on DataGridViewButton for the selected DataGridViewButton

https://github.com/user-attachments/assets/d29cd0dd-c58f-4ec7-bd29-07eedfc1ae32

### - During validation, five new issues were discovered:
**6. DataGridViewComboBoxCell Does Not Reflect Row Selection**
DataGridViewComboBoxCell with FlatStyle.Standard or FlatStyle.System under DisplayStyle.ComboBox or DisplayStyle.DropDownButton visually reflect row selection when FullRowSelect is enabled.
**DarkMode:**
Image
**Classic Mode:**

Image

**7. The DataGridViewComboBox cell no status change when using mouse hover on it**

https://github.com/user-attachments/assets/e8fec32a-2f7a-4714-b2a5-eb53f1d0d46e

**8. Incorrect Column Header Text Color in Dark Mode**
When setting SelectionMode to FullColumnSelect or ColumnHeaderSelect, the text color in column header is not correct under DarkMode

Image

**9. BackgroundColor Property Is Ignored in Dark Mode**
Setting DGV's BackgroundColor doesn't work under DarkMode
**DarkMode:**
Image

**ClassicMode:**
Image

**10. Custom DefaultCellStyle Colors Are Ignored in Dark Mode**
Setting DGV's DefaultCellStyle with custom ForeColor/SelectionBackColor/SelectionForeColor doesn't work under DarkMode
**DarkMode:**
Image

**ClassicMode:**
Image

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.