dotnet / dotnet/winforms

[DpiUnaware] The icons of MenuStrip/ToolStrip/StatusStrip aren't scaling well on 300% system DPI

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

Description

* .NET Core Version:
.NET SDK 7.0.100-alpha.1.21568.2

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

**Problem description:**
All icons are very large than the text on High Dpi under DpiUnaware mode.
![Icon_Actual](https://user-images.githubusercontent.com/90816462/143370535-71477ac0-fbdc-4736-b41c-1ed591d6fbbd.png)
![Icon_NetFX](https://user-images.githubusercontent.com/90816462/143370670-44646bbc-1279-4118-9a73-71d415c49345.png)

**Expected behavior:**
Icons should scale well.
![Icon](https://user-images.githubusercontent.com/90816462/143370615-62ea17af-cc2e-4879-bbb3-e9f68811d927.png)

**Minimal repro:**
1. Set system DPI to 300%.
2. Create a .NET Core WinForms project.
3. Add MenuStrip/ToolStrip/StatusStrip controls to Form.
4. Then insert standard items for MenuStrip/ToolStrip via clicking ‘Insert Standard Items’ in controls’ Tasks panel.
5. Add toolStripDropDownButton/toolStripSplitButton to StatusStrip control. Then change DisplayStyle property to ImageAndText.
6. Change the ApplicationHighDpiMode to DpiUnaware.
7. Run it.

**More info:**
1. This issue doesn't reproduce under PermonitorV2/SystemAware mode.
2. This issue doesn’t reproduce with following scenarios:
a. Create the sample project under 100% system DPI and close all opening designer, then zip it. – Non-HDPI environment.
[IconUnaware.zip](https://github.com/dotnet/winforms/files/7599875/IconUnaware.zip)
b. Set up another HDPI machine(300% DPI).
c. Extract the sample project created in step a.
d. Then run the project directly(F5 or start debugging).

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.