dotnet / dotnet/winforms

The TreeView incorrectly scale on the high DPI devices

Open
#9,881 2 comments 0 reactions 0 assignees View on GitHub
area-HDPI
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

### .NET version

.NET 6.0

### Did it work in .NET Framework?

Yes

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

No

### Issue description

The item text is cut inside the TreeView in high DPI.
See shortcut:
![image](https://github.com/dotnet/winforms/assets/23306796/087896e2-6c91-46cc-aba9-16860ca6eebd)
It works in .net framework 4.7 : (change the from net6.0-windows to net47)
![image](https://github.com/dotnet/winforms/assets/23306796/4671c864-d903-4237-a2fd-4e9bec439c14)

The test code:
[TreeViewSample.zip](https://github.com/dotnet/winforms/files/12574754/TreeViewSample.zip)

### Steps to reproduce

1. Create a VB form App(net 6.0) and place a TreeView. Fill in some content, for example, the paths under "C:\"
2. build the project
3. Set the DPI to 225%
4. Run the app

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.