Open Philip-Wang01 opened 1 year ago
Cc: @dreddy-work
@Philip-Wang01, can you track to which commit caused it?
@Philip-Wang01, can you track to which commit caused it?
Nevermind. Its result form here: https://github.com/dotnet/winforms/commit/31fcf979bb2627373f320c5dd6a970f60b08dcbd
Analyzed and found the root cause. Planning to get it in preview 6.
@Philip-Wang01, can you please validate this change for the anchor issues you found? Please validate on all high DPI modes in runtime as well as designer scenarios to check if there are no regressions.
@dreddy-work tested private binaries for GH PR: 9214 on run time for Multi-Monitors, two issues were found in PerMonitorV2
mode.
Issue1: When switching between the main and secondary monitors, the coordinate of the control will be shifted. (This issue also reproduced in other control when their anchor property is a non-default setting)
https://github.com/dotnet/winforms/assets/86937911/daa6e02a-efe9-4be4-9578-118d9910b28f
Issue2: For https://github.com/dotnet/winforms/issues/9209, controls still don't scale well when their anchor property is a non-default setting
https://github.com/dotnet/winforms/assets/86937911/c01ff582-5fbc-4d32-a4c7-af5471b5964b
Thanks @Philip-Wang01 for the update. I will go over these and update the PR.
@Philip-Wang01, updated PR and i cross checked these two examples. Can you run your tests again and see if there any other issues/regressions? please check both runtime and design scenarios for regressions.
@dreddy-work tested private binaries for GH PR: https://github.com/dotnet/winforms/pull/9214 on design time and run time for Multi-Monitors.
For runtime: Not fully fixed.
Issue: Anchor issue still repro in ListBox, CheckedListBox, TabControl and DateTimePicker control with non-default settings. And the controls in the tabcontrol are not scaled well when their anchor property both non-default setting. Test9200.zip
https://github.com/dotnet/winforms/assets/86937911/46c3f1f3-f22d-4129-b218-269c64e3af0e
For design time: one issue was found in PerMonitorV2
mode and hitting known issue: 5193 (all are not regressed from https://github.com/dotnet/winforms/commit/31fcf979bb2627373f320c5dd6a970f60b08dcbd).
Issue: When switching between the main and secondary monitors, the coordinate of the control with a non-default anchor setting will be shifted.
More Info:
Do we need to open a designer issue to track it?
https://github.com/dotnet/winforms/assets/86937911/cd690929-f1e8-49e3-82d1-179c2f805e57
.NET version
.NET 8.0.100-preview.6.23280.13
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, it works in .NET 6.0/7.0/8.0.100-preview.5.23262.2, doesn't work in 8.0.100-preview.5.23268.15.
Issue description
Testapp: Testapp.zip
https://github.com/dotnet/winforms/assets/86937911/6d4d445c-930f-4d03-a3ea-a439026670e4
100%DPI: 100% primary monitor -> 300% secondary monitor 300%DPI: 300% primary monitor -> 100% secondary monitor
Steps to reproduce
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
in csproj file.More Info: