Skip to content

Form.VisualStylesMode cannot be changed from Inherit to Classic in the VS properties window #15012

Closed

Description

@Olina-Zhang

.NET version

.NET 11 RC1 SDK build

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No, new APIs feature in .NET 11: #14809

Issue description

The Form.VisualStylesMode property cannot be changed from Inherit to Classic through the Visual Studio WinForms Designer Properties window.

When VisualStylesMode is changed from Inherit to Classic in the VS Properties window, the value immediately reverts to Inherit, and no serialization code is generated for VisualStylesMode = Classic.

Other values, including Disabled, Net11, and Latest, can be selected and serialized as expected.

VisualStylesMode_Classic.mp4

The runtime API itself works correctly when the property is set programmatically, or Runtime UI testing:

this.VisualStylesMode = VisualStylesMode.Classic;
MessageBox.Show(this.VisualStylesMode.ToString());

The message box correctly displays:

Classic

VisualStylesMode_Runtime.mp4

So the property correctly returns Classic, confirming that the runtime implementation behaves as expected. The issue appears to be limited to the Visual Studio Designer/Property Grid serialization.

Steps to reproduce

  1. Create a new WinForms project targeting .NET 11.
  2. Open the Form in the Visual Studio Designer.
  3. Select the Form.
  4. In the Properties window, locate the VisualStylesMode property.
  5. Change the value from Inherit to Classic.

Activity

  1. added
    untriaged
    NewApi-Net11
    on Sep 1, 2026
  2. added this to the 11.0-rc2 milestone on Sep 1, 2026
  3. added
    priority-1
    on Sep 1, 2026
  4. removed
    untriaged
    on Sep 1, 2026
  5. Zheng-Li01 commented on Sep 10, 2026

    @Zheng-Li01
    Member

    Verified the issue with .NET 11.0.0-rc.2.26458.109 + private dlls built from main branch of dotnet /winforms repo, the issue has been fixed as below screenshot.

    15012.mp4
  6. Amy-Li03 commented on Sep 24, 2026

    @Amy-Li03
    Contributor

    Verified with .NET 11 Oct 2026 Update Validation test pass build: .NET 11.0.0-RC.2.26473.101, issue has been fixed with above test result.

  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-Net11priority-1

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions