I'm writing a .NET Core 3.1 WinForms application but I've an issue with checkboxes. They simply don't appear on my form.
I tried to use both Visual Studio 2019 Version 16.5.2 and Visual Studio 2019 Preview Version 16.7.0 Preview 1.0. I activated the option Use the preview Windows Forms designer for .NET Core apps
(this option seems to be missing on the non-preview VS) but even with that the checkbox control is missing from the designer.
So instead I just manually added my checkboxes in the MyForm.Designer.cs
file
//
// checkboxRotate
//
this.checkboxRotate.Visible = true;
this.checkboxRotate.Location = new System.Drawing.Point(400, 40);
this.checkboxRotate.Name = "checkboxRotate";
this.checkboxRotate.Size = new System.Drawing.Size(104, 24);
this.checkboxRotate.TabIndex = 0;
//
// checkboxFlip
//
this.checkboxFlip.Visible = true;
this.checkboxFlip.Location = new System.Drawing.Point(370, 40);
this.checkboxFlip.Name = "checkboxFlip";
this.checkboxFlip.Size = new System.Drawing.Size(104, 24);
this.checkboxFlip.TabIndex = 0;
I set the locations based on other controls, these checkboxes should be at 40 on the vertical axis and 370 and 400 seem good to me on the horizontal axis.
However when I debug they still don't appear on my form. I tried to convert the application to .NET 5 (Preview 4 in installed on my machine) but nothing changed.
So how can I get the checkbox control to work? Can I get it in the designer in some way?
All the screenshots on the web are showing the checkbox control in the designer even this one from 5 days ago. They say the new designer is available in VS 2019 16.7 Preview 1 if the Use the preview Windows Forms designer for .NET Core apps
option is checked which is exactly what I did. So why don't I have this control?
Thanks
Aucun commentaire:
Enregistrer un commentaire