Replies: 3 comments 5 replies
-
You need to use |
Beta Was this translation helpful? Give feedback.
-
@RussKie thanks, that was helpful. i added the settings into my project file for default font, etc and the I am however still getting calls to From what I can tell this only happens on controls that subclass edit: not sure what's up with this... do i need to do something else to not get all the excess
|
Beta Was this translation helpful? Give feedback.
-
The issue with Using the net472 forms designer to edit a Switching to the net6 forms designer to edit the Without editing the I don't know where the 4/3/4/3 padding is being introduced. Seems like a designer bug. |
Beta Was this translation helpful? Give feedback.
-
Environment
vs2022
.NET version
net472 & net6.0-windows
Did this work in a previous version of Visual Studio and/or previous .NET release?
n/a
Issue description
I have Form classes that were designed under net472 which had a default font of
new Font(FontFamily.GenericSansSerif, 8.25f)
.When compiling/running under net6 I call
Application.SetDefaultFont(new Font(FontFamily.GenericSansSerif, 8.25f))
at the beginning of my program.If I set my project
TargetFramework
to net472, the windows forms editor works as expected.If I set my project
TargetFramework
tonet6.0-windows
, the windows forms editor wants to changethis.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
->this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
along with changing every control's
Location
andSize
and adding lines to set.Margin
.Is there a way to configure the designer to make it aware that my application uses an alternative default font under net6 so it doesn't make tons of changes to existing files when they are edited?
Steps to reproduce
see description
Diagnostics
No response
Beta Was this translation helpful? Give feedback.
All reactions