dotnet / dotnet/winforms

[Multi-Monitor] DataGridView is not scaled well when DPIs differ

Open
#5,096 0 comments 0 reactions 0 assignees View on GitHub
:beetle: bug area-controls-DataGridView area-HDPI-SA
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

* More info
The issue also can reproduce on when setting the primary screen as 300% DPI, and secondary screen 100% DPI.

* .NET Core Version:
.NET 6.0.100-preview.6.21313.2 + private binaries build from main branch in dotnet/winforms repo.
[New.zip](https://github.com/dotnet/winforms/files/6653300/New.zip)

* Have you experienced this same bug with .NET Framework?:
No

**Expected behavior:**
DataGridView is scaled well when DPIs differ

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

Actual Results:
100% primary screen:
![image](https://user-images.githubusercontent.com/38325459/122003288-be1f9b00-cd67-11eb-9133-3bc68ee19340.png)
Move to 300% secondary screen:
![image](https://user-images.githubusercontent.com/38325459/122003535-122a7f80-cd68-11eb-9820-b06b9823f085.png)

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.