Skip to content

TextBox and ComboBox are too tall in Net11 visual styles #14938

Description

@LeafShi1

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

  1. Create a WinForms application targeting .NET 11.
  2. Place single-line TextBox and ComboBox controls next to equivalent controls using classic visual styles.
  3. Enable VisualStylesMode.Net11 for the modern controls.
  4. Compare their PreferredHeight, actual height, text alignment, and surrounding vertical whitespace.
  5. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions