Windows 10 Creators Updateがリリースされましたが、Windows 8.1から3年経過して、なぜか分かりませんがMicrosoftがようやくデスクトップアプリのPer-Monitor DPI対応に力を入れてきています。今更WinFormsまで対応してくるとは予想外でした。
- High-DPI Scaling Improvements for Desktop Applications in the Windows 10 Creators Update
- Channel 9: High DPI Improvements for Desktop App Developers in the Windows 10 Creators Update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application xmlns="urn:schemas-microsoft-com:asm.v3"> | |
<windowsSettings> | |
<!-- Per Monitor V1 [OS >= Windows 8.1] | |
Values: False, True, Per-monitor, True/PM --> | |
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> | |
true/PM</dpiAware> | |
<!-- Per Monitor V1 [OS >= Windows 10 Anniversary Update (1607, 10.0.14393, Redstone 1)] | |
Values: Unaware, System, PerMonitor --> | |
<!-- Per Monitor V2 [OS >= Windows 10 Creators Update (1703, 10.0.15063, Redstone 2)] | |
Value: PerMonitorV2 --> | |
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> | |
PerMonitorV2, PerMonitor</dpiAwareness> | |
</windowsSettings> | |
</application> |
これによって、WPFのPer-Monitor DPI対応はひとまず完成ということで、何か特別なことをしない限りマニフェストに書くだけです。まあUIを作っていると、その何か特別なことが往々にして必要になりますが。