Skip to content

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

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions