You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
Create a new WinForms project targeting .NET 11.
Open the Form in the Visual Studio Designer.
Select the Form.
In the Properties window, locate the VisualStylesMode property.
.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.VisualStylesModeproperty cannot be changed fromInherittoClassicthrough the Visual Studio WinForms Designer Properties window.When
VisualStylesModeis changed fromInherittoClassicin the VS Properties window, the value immediately reverts toInherit, and no serialization code is generated forVisualStylesMode = Classic.Other values, including
Disabled,Net11, andLatest, 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:
The message box correctly displays:
ClassicVisualStylesMode_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
VisualStylesModeproperty.InherittoClassic.