Skip to content

Child controls overlap the GroupBox border for Standard and Popup styles after switching VisualStylesMode from Classic to NET11 #14832

Description

@Olina-Zhang

.NET version

.NET 11 SDK build: 11.0.100-rc.1.26380.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+?

Not support, new feature of #14811

Issue description

When switching a GroupBox from VisualStylesMode.Classic to VisualStylesMode.Net11, child controls are incorrectly positioned for FlatStyle.Standard and FlatStyle.Popup.

After the switch, the child controls (Button and CheckBox)near the top of the GroupBox extend into (or beyond) the GroupBox header/border area instead of remaining within the client area.

FlatStyle.Flat and FlatStyle.System do not exhibit this issue.

VisualStylesMode = Classic:

Image

VisualStylesMode = NET11:

Image

Steps to reproduce

  1. Create a WinForms (.NET 11) application.
  2. Add four GroupBox controls with the following FlatStyle values:
  • Standard
  • Flat
  • Popup
  • System
  1. Place a Button and a CheckBox near the top of each GroupBox.
  2. Run the application with VisualStylesMode.Classic.
  3. Switch the Form (or application) to VisualStylesMode.Net11 to run and observe.

Metadata

Metadata

Labels

NewApi-Net11Tracks issues for public APIs targeted for .NET 11.waiting-on-teamThis work item needs to be discussed with team or is waiting on team action in order to proceed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions