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
- On a secondary monitor, set the display scaling to 175%
- Ensure
<WindowsPackageType>None</WindowsPackageType>
is not set - Run the application
Then, the reported scale factor will be correctly stated as 175%.
Incorrect Reporting
- On a secondary monitor, set the display scaling to 175%
- Ensure
<WindowsPackageType>None</WindowsPackageType>
is set - Run the application
Then, the reported scale factor will be incorrectly stated as 140%.