Skip to content

Disable NET11 VisualStylesMode for composite controls (ToolStrip, DataGridView, etc.) until NET11 layout modernization is completed #15031

Description

@SimonZhao888

.NET version

.NET 11.0.0-preview.7.26381.103

Issue description

Several composite controls have not yet been fully adapted to the new .NET 11 VisualStylesMode rendering model.

Unlike standalone controls such as TextBox and ComboBox, composite controls such as ToolStrip, MenuStrip, and DataGridView still rely on legacy sizing and layout assumptions.

When VisualStylesMode.Net11 or VisualStylesMode.Latest is enabled, the new control metrics and padding can cause visual and layout regressions in these controls and their hosted child controls.

The observed issues include:

  • Vertically clipped text.
  • Content that is not fully visible.
  • Incorrect DataGridView row-height calculations.
  • Insufficient padding.
  • Incorrectly rendered borders.
  • Incomplete rendering of hosted editing controls such as
    ToolStripComboBox and DataGridView editing controls.
Image Image

Expected behavior

Composite controls should render correctly when using VisualStylesMode.Net11, without clipped content, incorrect sizing, or layout
regressions.

Actual behavior

ToolStrip, MenuStrip, and DataGridView can render incorrectly because their layout and hosted-control implementations have not yet been modernized for the .NET 11 metrics.

Steps to reproduce

  1. Create a WinForms application.
  2. Set VisualStylesMode to NET11.
  3. Add a ToolStripTextBox to a MenuStrip/ToolStrip.
  4. Add a dataGridViewComboBox to a DataGridView.
  5. Run the application.

Implementation status

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NewApi-Net11Tracks issues for public APIs targeted for .NET 11.

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions