Skip to content

[Multi-Monitor][PermonitorV2] Buttons are not not scaled well (with Anchor=Top,Bottom) when move from 300% primary screen to 100% secondary monitor #8266

Description

@Philip-Wang01

.NET version

.NET 8.0.100-alpha.1.225727.7 + private dlls build from Winforms repo, regression from PR: #7956

Did it work in .NET Framework?

Yes

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

Yes, it'a regression issue, not repro on .NET 6.0 & 7.0, only repro on .NET 8.0.100-alpha.1.225727.7 + private dlls build from Winforms repo, regression from PR: #7956

Issue description

Buttons are not not scaled well (with Anchor=Top,Bottom) when move from 300% primary screen to 100% secondary monitor
image

Steps to reproduce

  1. Launch VS instance on 300% primary screen.
  2. Create a WinForms .NET Core project.
  3. Add PerMonitorV2 in csproj file.
  4. Add some buttons with different anchor properties to form designer.
  5. Build and run it, move to 100% secondary monitor.

Or:

  1. Extract and open Testbuttonanchor.zip on 300% primary screen.
  2. Build and run it, move to 100% secondary monitor.

Actual result:
Buttons are not not scaled well (with Anchor=Top,Bottom) when move from 300% primary screen to 100% secondary monitor.
image

Expected result:
Buttons should be scaled well (with Anchor=Top,Bottom) when move from 300% primary screen to 100% secondary monitor.
image

More info:

  1. This issue doesn't repro on SystemAware and DpiUnware mode.
  2. This issue does not occur when move from 100% primary to 300% secondary monitor.
  3. This issue only repro on Anchor = Top,Bottom, Anchor = Top,Bottom,Left, Anchor = Top,Bottom,Right and Anchor = Top,Bottom,Left,Right.
  4. This is a reduce behavior on private testing, regression from PR: Update Anchor Layout to support high DPI machines. #7956

Metadata

Metadata

Assignees

No one assigned

    Labels

    💥 regression-previewRegression from a preview releasearea-HDPI-PMv2Issues related to high DPI PerMonitorV2 mode

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions