Skip to content

RescaleConstantsForDpi method provide parameters incorrect #15144

Open

Description

@chenYL123djdj

.NET version

.NET SDK:
Version: 10.0.301
Commit: 96856fd726
Workload version: 10.0.300-manifests.8c7d7c03
MSBuild version: 18.6.4+96856fd72

Did it work in .NET Framework?

Yes

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

It works correctly on .NET 8.0.28.

Issue description

In PerMonitorV2 ApplicationHighDpiMode, when dpi changed, the deviceDpiOld and deviceDpiNew is equal.

internal class ButtonEx : Button
{
    protected override void RescaleConstantsForDpi(int deviceDpiOld, int deviceDpiNew)
    {
        base.RescaleConstantsForDpi(deviceDpiOld, deviceDpiNew);
        MessageBox.Show($"deviceDpiOld:{deviceDpiOld}\ndeviceDpiNew:{deviceDpiNew}");
    }
}

Steps to reproduce

switch dpi, RescaleConstantsForDpi method provide parameters incorrect.
PerMonitorV2Test.zip

devenv_p65gupKnTc.mp4

Activity

  1. added
    untriagedThe team needs to look at this issue in the next triage
    on Sep 18, 2026
  2. self-assigned this
    on Sep 24, 2026
  3. LeafShi1 commented on Sep 24, 2026

    @LeafShi1
    Member

    This issue has been fixed in PR #14454, @KlausLoeffelmann Do we need to backport this change to release/10.0

  4. added
    waiting-on-teamThis work item needs to be discussed with team or is waiting on team action in order to proceed
    and removed
    untriagedThe team needs to look at this issue in the next triage
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-HDPI-PMv2Issues related to high DPI PerMonitorV2 modewaiting-on-teamThis work item needs to be discussed with team or is waiting on team action in order to proceed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions