From 4ec17076b9271b7734cd30dd191ed7b877e7f994 Mon Sep 17 00:00:00 2001 From: Swapnil Sonawane Date: Sun, 14 Apr 2024 15:43:58 +0530 Subject: [PATCH] fixed #101019 --- .../System/Windows/Forms/Layout/Containers/ContainerControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Layout/Containers/ContainerControl.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Layout/Containers/ContainerControl.cs index 4dea17f2f10..54257713c87 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/Layout/Containers/ContainerControl.cs +++ b/src/System.Windows.Forms/src/System/Windows/Forms/Layout/Containers/ContainerControl.cs @@ -860,7 +860,7 @@ protected override void OnFontChanged(EventArgs e) // to scale in Dpi mode (during WM_DPICHANGED event). // This may require scaling/relayout of the form. AutoScaleFactor will take // AutoScaleMode into account while scaling the controls. - if (AutoScaleMode != AutoScaleMode.None && IsHandleCreated) + if ((AutoScaleMode != AutoScaleMode.None && IsHandleCreated) || AutoScaleMode is AutoScaleMode.Font or AutoScaleMode.Inherit) { _currentAutoScaleDimensions = SizeF.Empty;