dotnet / dotnet/winforms

WinForms HighDPI PerMonitorV2 ListView ColumnHeader scales wrong

Open
#5,090 1 comment 1 reaction 0 assignees View on GitHub
:beetle: bug area-controls-ListView area-HDPI-PMv2
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

**.NET Core Version:**
SDK: 5.0.203 (383637d63f)
Runtime: 5.0.6 (478b2f8c0e)

**Problem description:**

If a ListView is put into View.Detailed mode, the column headers are not scaled when the DPI changes.

Starting on the main monitor looks correct:
![image](https://user-images.githubusercontent.com/80055480/121857585-1322c900-ccf6-11eb-9931-6228fd698788.png)

Moving the window to another monitor with different DPI gives the following result:
![image](https://user-images.githubusercontent.com/80055480/121857675-29c92000-ccf6-11eb-9db2-cb6f043cecda.png)

**Expected behavior:**
The column headers should be scaled as well.

**Minimal repro:**
A sample is attached here:
[TestDpiListView.zip](https://github.com/dotnet/winforms/files/6646533/TestDpiListView.zip)

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.