.NET version
.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-3 branch of https://github.com/KlausLoeffelmann/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 #14768
Issue description
When VisualStylesMode is set to NET11, a GroupBox with FlatStyle = Popup or Flat display its header or border using the Windows accent color even when neither the GroupBox nor any of its child controls has focus.
In the attached screenshot, Button2 has the focus and correctly displays the accent-colored focus indicator. However, Popup GroupBox also displays an accent-colored header despite being inactive.
The issue does not reproduce GroupBox with other FlatStyle values: Standard and System.
Steps to reproduce
- Set the Windows Accent Color to a noticeable color.
- Create a WinForms application targeting .NET 11.
- Set the Form's
VisualStylesMode to NET11.
- Add multiple
GroupBox controls using different FlatStyle values.
- Set one
GroupBox to FlatStyle = Popup or Flat.
- Run the application.
- Ensure another control (e.g. a
Button) has focus.
.NET version
.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-3 branch of https://github.com/KlausLoeffelmann/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 #14768
Issue description
When
VisualStylesModeis set toNET11, aGroupBoxwithFlatStyle = PopuporFlatdisplay its header or border using the Windows accent color even when neither theGroupBoxnor any of its child controls has focus.In the attached screenshot,
Button2has the focus and correctly displays the accent-colored focus indicator. However,Popup GroupBoxalso displays an accent-colored header despite being inactive.The issue does not reproduce GroupBox with other
FlatStylevalues:StandardandSystem.Steps to reproduce
VisualStylesModetoNET11.GroupBoxcontrols using differentFlatStylevalues.GroupBoxtoFlatStyle = PopuporFlat.Button) has focus.