Skip to content

ForeColor incorrectly affects the border color of editable controls under VisualStylesMode.NET11 #14847

Closed

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 #14792

Issue description

When VisualStylesMode is set to NET11, setting the ForeColor of editable controls causes the control border to be rendered using the same color.

This behavior is observed on:

TextBox
MaskedTextBox
RichTextBox
ComboBox
DomainUpDown
NumericUpDown

Under VisualStylesMode.Classic, ForeColor only affects the text, while the border remains the system default color.

Image

Steps to reproduce

  1. Create a WinForms application with targeting .NET11.
  2. Set Form's VisualStylesMode to NET11.
  3. Add any of the following controls:
TextBox
MaskedTextBox
RichTextBox
ComboBox
DomainUpDown
NumericUpDown
  1. Set:
    ForeColor = Color.Cyan;
  2. Run the application.

WinFormsApp1.zip

Activity

  1. added
    untriaged
    NewApi-Net11
    on Aug 5, 2026
  2. self-assigned this
    on Aug 5, 2026
  3. removed
    untriaged
    on Aug 5, 2026
  4. Zheng-Li01 commented on Sep 4, 2026

    @Zheng-Li01
    Member

    Verified the issue with latest .NET11 11.0.0-rc.2.26453.107 + private dlls built from main branch of dotnet/winforms repro, the issue has been fixed as below screenshot.

    Image
  5. added this to the 12.0-preview1 milestone on Sep 4, 2026
  6. Zheng-Li01 commented on Sep 23, 2026

    @Zheng-Li01
    Member

    Verified the issue with .NET 11 Oct 2026 Update Validation test pass build .NET 11.0.0-RC.2.26427.104, the issue has been fixed that have the same test results as above.

  7. locked and limited conversation to collaborators on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NewApi-Net11

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions