Anchoring issue on multi-monitor setup using HDPI PerMonitorV2
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 103
Description
### .NET version
.NET 9.0 Preview 4
### Did it work in .NET Framework?
Yes
### Did it work in any of the earlier releases of .NET Core or .NET 5+?
This worked in NET 6.
### Issue description
When moving the MDIParent from a 100% monitor to a 150% monitor, widening the form, closing frmNameList, then opening a new form (File -> Names), the new form is not laid out correctly. The PictureBox Custom Control is too far to the left, but was anchored Top, Right. The ListView control is too wide and overlaps with the controls to the right of it.
https://github.com/dotnet/winforms/assets/2184698/a41be26a-ba6f-48a2-b452-d78005e1631f
### Steps to reproduce
1. Run the project on a 100% monitor.
2. Move the MDIParent to a 150% monitor.
3. Make MDIParent wider
4. Close frmNameList then re-open it under the menu option File -> Name.
5. On the new form, the PictureBox Control is positioned too far to the left and inside the listview. The regular PictureBox that is not a custom control is positioned properly.
6. The ListView control is too wide and overlaps with all of the controls to the right of it.
[AnchorIssue.zip](https://github.com/user-attachments/files/15779847/AnchorIssue.zip)
Contributor guide
Assessment
This issue has not been assessed yet.