dotnet / dotnet/winforms

In some specific nesting situations, controls aren't properly scaled.

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

Description

### .NET version

.net 8

### 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

When a control is placed in a SplitContainer inside a TabControl on its second page, this control isn't included in the auto-scaling until after the second page has been created (selected).

The behavior at design time is also affected. To prevent issues during design time, the font size can't be altered from its default.

[TestAutoScaleOnFontChange.zip](https://github.com/user-attachments/files/16499800/TestAutoScaleOnFontChange.zip)

### Steps to reproduce

1. Make a form with a TabControl having two tabs. Put some controls inside the SplitContainer in the second tab.
2. When the form is shown, change its font size (OnShown event).
3. Switch to the second tab, the controls are not scaling correctly when they're put inside a SplitContainer.

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.