Skip to content

PropertyGrid exposes VisualStylesModeChanged event although VisualStylesMode is hidden #14803

Description

@Olina-Zhang

.NET version

.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-4 branch of https://github.com/KlausLoeffelmann/winforms repo

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

PropertyGrid hides the VisualStylesMode property, but the corresponding VisualStylesModeChanged event is still exposed in the Events window.

Since PropertyGrid explicitly hides VisualStylesMode (Browsable(false)) and always reports VisualStylesMode.Classic, exposing the VisualStylesModeChanged event is inconsistent and may confuse developers.

Image

Steps to reproduce

  1. Create a WinForms (.NET 11) project.
  2. Add a PropertyGrid control to the Form.
  3. Select the PropertyGrid in the Designer.
  4. Verify that the VisualStylesMode property is not shown in the Properties window.
  5. Switch to the Events view to observe.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions