dotnet / dotnet/winforms

ComboBox displays the selected item with a dark blue selection background when DropDownStyle is DropDownList in NET11 mode

Open
#14,908 3 comments 0 reactions 1 assignee Claimed by @KlausLoeffelmann View on GitHub
NewApi-Net11 rendering-or-artifacts-issues
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

.NET11 SDK build: 11.0.100-rc.1.26413.103 + private dlls built from main branch of Winforms repo

### Did it work in .NET Framework?

Not tested/verified

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

Not support, new feature of https://github.com/dotnet/winforms/pull/14809

### Issue description

When a WinForms `ComboBox` is configured with `DropDownStyle = DropDownList` and `VisualStyleMode = NET11`, the selected item(Text area) is rendered with a dark blue background and white text after the drop-down list is closed.

**SystemColorMode with Light:**
Image
**SystemColorMode with Dark:**

Image

The selected item remains displayed with this dark blue selection background in the ComboBox text area, which differs from the rendering in `VisualStyleMode = Classic`.
**SystemColorMode with Light:**
Image

**SystemColorMode with Dark:**

Image

### Steps to reproduce

1. Create a WinForms application targeting .NET 11.
2. Add a `ComboBox` to the form.
3. Set `DropDownStyle` to `DropDownList`.
4. Add one or more items to the ComboBox.
5. Set `VisualStyleMode` to `NET11`.
6. Run the application.
7. Open the ComboBox and select an item.
8. Close the drop-down list.

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.