Skip to content

Font size of a UserControl in ToolStripControlHost is wrong after changing system dpi #9581

@tbambuch

Description

@tbambuch

.NET version

8.0

Did it work in .NET Framework?

Yes

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

No response

Issue description

The Font of UserControl in ToolStripControlHost is wrong after the system dpi scaling is changed if the contextmenu has never been opened before

image

Steps to reproduce

Run the attached sample, do not open the contextmenu and change the dpi settings in Windows, app still running. The correct font is set for the form and for menuitems, but the Font for a UserControl under ToolStripControlHost is wrong
In my case I change from 150% (default) to 125%, only a single monitor attached. Windows 11

Metadata

Metadata

Assignees

Labels

🚧 work in progressWork that is current in progressarea-HDPIHDPI, not specific to Dpi mode of app

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions