-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix high Dpi, close #3347 #3348
Fix high Dpi, close #3347 #3348
Conversation
To me it looks like there are some lines/parts missing if scaling is <200%... Is this something you could fix as well? |
I know that might be out of scope for this PR - what-if we modernized the whole dialog to a Textbox with Scrollbars? |
@siegfriedpammer I move CustomDialog.cs to a new project, test without any changes, this issue doesn't happen on .NET Framework, only happen on .NET Core(even if I use 1920*1080 100%) So there's no such issue when ILSpy make the code first time, it's exposed when ILSpy migrate to .NET Core. My test code: Test.zip
|
I'd think the best way to address this problem would be to let WPF layout engine handle the placement of controls by using a Moving it to .xaml would also allow the design to be previewed and easily updated |
I want to know, why this code has such issue on .NET Core when Label.Size = MeasureString's result? There's bug on MeasureString on .NET Core? Can you test it and report to Microsft if it's buggy. |
I got part of the truth: label.Font = new Font(...);
SizeF size = g.MeasureString(message, label.Font); |
@siegfriedpammer I got the whole truth: We should use TextRenderer.MeasureText instead of Graphics.MeasureString to get exact result. |
8cf3bf5
to
19d4f01
Compare
Thank you very much! |
100%
125%
150%
175%
200%