dotnet / dotnet/winforms

[Multi-Monitor] Controls (with Anchor=Right) scaling incorrectly inside splitContainer

Open
#8,157 4 comments 0 reactions 0 assignees View on GitHub
area-HDPI-PMv2
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

8.0.100-alpha.1.22559.18

### Did it work in .NET Framework?

No

### Did it work in any of the earlier releases of .NET Core or .NET 5+?

No. The fix scaling in SplitContainer controls for HDPI has only been introduced since .Net 8.0. The original issue: https://github.com/dotnet/winforms/issues/3168

### Issue description

**Current Behavior: Controls (with Anchor=Right) scaling incorrectly inside splitContainer on HDPI**

100% DPI primary screen to 300% DPI secondary screen:
![image](https://user-images.githubusercontent.com/86937911/201048665-b0f8d3a5-52e8-4caa-bed9-407e45d41518.png)

https://user-images.githubusercontent.com/86937911/201048384-56d866ab-2645-4d57-9e73-5d77254aabff.mp4

300% DPI primary screen to 100% DPI secondary screen:
![image](https://user-images.githubusercontent.com/86937911/201047956-74b8c751-4c34-4b15-88f3-215c47513b7a.png)

**Expected Behavior: Controls scaling correctly inside splitContainer on HDPI**
![image](https://user-images.githubusercontent.com/86937911/201046955-e07ca0ce-bcfd-45b6-9847-1bd6488b6eae.png)

### Steps to reproduce

1. Set the primary screen as 100% DPI, and secondary screen 300% DPI.
2. Open the attached the application.
[testapp.zip](https://github.com/dotnet/winforms/files/9979341/testapp.zip)
3. Build & run the application.
4. Moving the form from 100% primary screen to 300% secondary screen.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.