dotnet / dotnet/winforms

GroupBox doesn't apply ForeColor in ambient condition

Open
#9,958 9 comments 1 reaction 1 assignee Claimed by @KlausLoeffelmann View on GitHub
:construction: work in progress help wanted priority-2
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

All. Unfortunately.

### Did it work in .NET Framework?

No. Unfortunately.

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

No.

### Issue description

When the GroupBox is inheriting its ForeColor by its Parent control, the color is not correctly applied.

### Steps to reproduce

* Create a new WinForms Form.
* Insert a TableLayoutPanel
* Insert a GroupBox
* Change the Backcolor of the Form to 32,32,32
* Change the ForeColor of the Form to 240,240,240

The GroupBox should render the Text in light on dark background, but only the Frame is light. The text gets rendered in the original color:

![image](https://github.com/dotnet/winforms/assets/9663150/d3aafcca-082d-47b0-a245-3ca9ce01d46e)

@Olina, can you test, if this is a Framework regression? Thanks!

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.