we have a Host Delphi App, which is compiled with Delphi 10.3.3.
In the manifest we have defined our app to be dpi aware: ‘Per Monitor V2’.
I examine the process using Task Manager, our app has the DPI-Awarness set to ‘Per-Monitor (v2)’.
Also in Delphi, when we move our app to a monitor that uses a different DPI scale the Dpi, the WM_DPICHANGED event is triggered.
WPF also offers a similar event: Window.DpiChanged. If I create a WPF window from within a Hydra .NET plugin and subscribe to this event, the event is never fired. We target .NET 4.8.
Also it seems that the Window/VisualPlugin are always using the DPI of the primary monitor.
For example my primary monitor is scaled at 150%. When I move the plugin to a monitor scaled at 100% (96 dpi), the plugin/window is too big. It remains scaled at 1.5.
We do not call any of the SetProcessDPIAware api’s. We just rely on the manifest.
Do you have any guidance on how to deal with high dpi scenarios for WPF Visual Plugins?
Is there DpiChanged event supposed to be triggered?