Summary
In VisualStylesMode.Net11, single-line TextBox and ComboBox controls are taller than their classic counterparts and contain excessive vertical whitespace.
This is especially noticeable in forms containing multiple input controls and in layouts such as TableLayoutPanel, where the larger preferred heights increase row heights and make existing forms appear more widely spaced after switching to the modern visual style.
Reproduction
- Create a WinForms application targeting .NET 11.
- Place single-line TextBox and ComboBox controls next to equivalent controls using classic visual styles.
- Enable
VisualStylesMode.Net11 for the modern controls.
- Compare their
PreferredHeight, actual height, text alignment, and surrounding vertical whitespace.
- Repeat in an AutoSize TableLayoutPanel and at 100%, 150%, 225%, and 350% display scaling.
Actual behavior
The modern TextBox and ComboBox reserve additional vertical chrome/padding, making them noticeably taller than the classic controls. Auto-sized layout rows grow accordingly, which can cause visible layout changes in applications adopting the Net11 visual style.
Expected behavior
The modern controls should retain the classic single-line height contract, or remain close enough to it to avoid unnecessary vertical whitespace and layout expansion, while still preserving readable, unclipped text and the modern border treatment across supported DPI settings.
Tracking
PR #14887 contains the proposed implementation and test updates for this issue.
Summary
In
VisualStylesMode.Net11, single-line TextBox and ComboBox controls are taller than their classic counterparts and contain excessive vertical whitespace.This is especially noticeable in forms containing multiple input controls and in layouts such as TableLayoutPanel, where the larger preferred heights increase row heights and make existing forms appear more widely spaced after switching to the modern visual style.
Reproduction
VisualStylesMode.Net11for the modern controls.PreferredHeight, actual height, text alignment, and surrounding vertical whitespace.Actual behavior
The modern TextBox and ComboBox reserve additional vertical chrome/padding, making them noticeably taller than the classic controls. Auto-sized layout rows grow accordingly, which can cause visible layout changes in applications adopting the Net11 visual style.
Expected behavior
The modern controls should retain the classic single-line height contract, or remain close enough to it to avoid unnecessary vertical whitespace and layout expansion, while still preserving readable, unclipped text and the modern border treatment across supported DPI settings.
Tracking
PR #14887 contains the proposed implementation and test updates for this issue.