You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Breaking change]: Fix top-level window size for non-linear dimensions based on AutoScaleMode in PermonitorV2 DPI mode #33696
In PermonV2 mode applications, we have been using linear sizes (also known as DPI-scaled sizes) provided by Windows for top-level windows, regardless of the AutoScaleMode. This has been problematic when using the AutoScaleMode.Font, as Form scaling should be non-linear in this case, as the child controls are scaled non-linearly and depend on the Font that was assigned to the Form or child controls.
We are enabling WM.GETDPISCALEDSIZE message handling for top -level Form and utilize GetDpiScaledSize to let Windows know that Form may need non-linear sizes depending on AutoScaleMode.
Version
.NET 8 Preview 1
Previous behavior
In PermonV2 mode applications, top-level windows (Forms in this case) always scaled by Windows and is ignoring the AutoScaleMode. This resulted in inconsistant scaling between Form and its child controls.
New behavior
In PermonV2 mode applications, top-level windows (such as Forms) will now be scaled according to the AutoScaleMode, ensuring consistency with the scaling of their child controls.
Type of breaking change
Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
Behavioral change: Existing binaries may behave differently at run time.
Reason for change
Improving the High DPI experience in PermonitorV2 mode WinForms applications.
Activity