.NET version
11.0.0-preview.7.26365.114 + private dlls built from Net11/Integration-2 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+?
This is new API introduced by #14746
Issue description
An exception pops up for checkbox after setting the FlatStyle = System & Appearance = ToggleSwitch with set VisualStylesMode as NET11
Steps to reproduce
- Create a .NET winforms project
- Set the VisualStylesMode as NET11 for the form1
- Add CheckBox contorl on the form1.cs[Design]
- Set the Appearance as ToggleSwitch & FlatStyle as System for the checbox1
- Build & run the project
- Click the checkbox1
**Call Stack: **
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.CheckBox.get_DownChangeRectangle() in C:\Klaus\winforms\src\System.Windows.Forms\System\Windows\Forms\Controls\Buttons\CheckBox.cs:line 420
at System.Windows.Forms.ButtonBase.OnMouseDown(MouseEventArgs mevent) in C:\Klaus\winforms\src\System.Windows.Forms\System\Windows\Forms\Controls\Buttons\ButtonBase.cs:line 965
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) in C:\Klaus\winforms\src\System.Windows.Forms\System\Windows\Forms\Control.cs:line 11756
at System.Windows.Forms.Control.WndProc(Message& m) in C:\Klaus\winforms\src\System.Windows.Forms\System\Windows\Forms\Control.cs:line 12700
at System.Windows.Forms.ButtonBase.WndProc(Message& m) in C:\Klaus\winforms\src\System.Windows.Forms\System\Windows\Forms\Controls\Buttons\ButtonBase.cs:line 1516
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, UInt32 msg, WPARAM wparam, LPARAM lparam) in C:\Klaus\winforms\src\System.Windows.Forms\System\Windows\Forms\NativeWindow.cs:line 351
************** Loaded Assemblies **************
.NET version
11.0.0-preview.7.26365.114 + private dlls built from Net11/Integration-2 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+?
This is new API introduced by #14746
Issue description
An exception pops up for checkbox after setting the FlatStyle = System & Appearance = ToggleSwitch with set VisualStylesMode as NET11
Steps to reproduce
**Call Stack: **