Skip to content
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

Opening Dialog Form on multi-monitor setup using HDPI PerMonitorV2 does not scale properly #11512

Open
alanhoman opened this issue Jun 8, 2024 · 3 comments
Labels
area-Anchor/Scaling HDPI issues around anchoring and docking area-HDPI HDPI, not specific to Dpi mode of app
Milestone

Comments

@alanhoman
Copy link
Contributor

.NET version

.NET 9 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.0

Issue description

Opening a modal Dialog form on a 150% monitor does not scale properly and the buttons anchored to the bottom right do not anchor properly. They are rendered underneath controls above them and are unusable.

DialogIssue.mp4

Steps to reproduce

  1. Open the project on a 100% monitor.
  2. Click on Edit Non-Modal and Edit Modal. Both forms scale properly and are the same size.
  3. Move the MDIParent to a 150% monitor.
  4. Click on Edit Non-Modal and the form looks OK, but the buttons overlap slightly with the controls above them.
  5. Click on Edit Modal and the buttons are higher and completely under other controls making them unusable. The form itself is also larger than the Non-Modal version.

Here is a sample project:
DialogIssue.zip

@alanhoman alanhoman added the untriaged The team needs to look at this issue in the next triage label Jun 8, 2024
@elachlan elachlan added area-Anchor/Scaling HDPI issues around anchoring and docking area-HDPI HDPI, not specific to Dpi mode of app labels Jun 8, 2024
@alanhoman
Copy link
Contributor Author

Also, I tried using the new AnchorLayoutV2 and this did not solve the issue. The modal and non-modal form's buttons were in a better position at 150% (although the Modal form's buttons were a little too close to the controls above them).

The issue is when you close the frmNameList form and re-open it as shown in the attached video. The form has multiple layout issues caused by AnchorLayoutV2. The Criteria group box overlaps with the list view, the Modal buttons overlap, and the picture box controls are in the wrong location. Using AnchorLayoutV2 is not feasible since it creates more issues than it solves.

This should also be tagged as regression-release since these issues did not occur in .NET 6 and was introduced in .NET 7.

DialogIssue2.mp4

@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Jun 11, 2024
@merriemcgaw merriemcgaw added this to the .NET 10.0 milestone Jun 11, 2024
@merriemcgaw
Copy link
Member

We are hoping to holistically address scaling and layout in .NET 10. There is no real way to address these piece by piece we've determined, so we intend to look at layout from the ground up in a near future release.

@alanhoman
Copy link
Contributor Author

This sounds promising and I hope this is a high priority considering how many people use multiple monitors at varying DPI’s and scaling %. The HDPI issues were originally slated to be addressed in .NET 6, 7, 8, and 9, so we have been waiting 4 years for a solution. This has prevented us from being able to migrate from .NET Framework to .NET. Our main app has over 2,500 forms, so moving to WPF or MAUI is not an option at this point. I hope that this holistic approach will not utilize the AnchorLayoutV2 approach which basically fixed one thing and broke multiple other things making it unusable to us.

I would be interested in early testing and evaluation so please let me know if I can be of help in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Anchor/Scaling HDPI issues around anchoring and docking area-HDPI HDPI, not specific to Dpi mode of app
Projects
None yet
Development

No branches or pull requests

3 participants