dalyIsaac / WindowsMonitorInfo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WindowsMonitorInfo

A proof-of-concept to test whether a Windows App SDK application can correctly acquire monitor scale factors using GetScaleFactorForMonitor (via CsWin32).

When <WindowsPackageType>None</WindowsPackageType> is set, the scale factor will be reported incorrectly. When running as a packaged app, the scale factor is reported correctly.

This anomaly was also encountered in this response on StackOverflow.

Correct Reporting

  1. On a secondary monitor, set the display scaling to 175%
  2. Ensure <WindowsPackageType>None</WindowsPackageType> is not set
  3. Run the application

Then, the reported scale factor will be correctly stated as 175%.

Incorrect Reporting

  1. On a secondary monitor, set the display scaling to 175%
  2. Ensure <WindowsPackageType>None</WindowsPackageType> is set
  3. Run the application

Then, the reported scale factor will be incorrectly stated as 140%.

About


Languages

Language:C# 100.0%