helix-toolkit icon indicating copy to clipboard operation
helix-toolkit copied to clipboard

DPI Scaling with two monitors

Open gregorsGit opened this issue 4 years ago • 2 comments

Hi, I am using a laptop with 100% dpi scale with FHD. And an external monitor with 125% dpi. When I start the SharpDX-Wpf Application on my main window everything i okay. Property DPIScale was 1. Now I move the Window onto my external monitor. The DPIScale dont change and stands on 1. When I try to change it with snoop. Nothing happens. The 3D-view was blur!

When I use only one monitor and starts with 125% everything is okay. Even changes on DPIScale have an effect.

Can someone helps? I think it is a little bug with two different DPI scales. And sometimes a missing update when changing the propery.

gregorsGit avatar Feb 16 '22 12:02 gregorsGit

WPF does not support dynamic dpi change. There is no event we can subscribe when DPI changed. You probably want to manually set Viewport3DX.DpiScale when switching the monitor if you are able to find someway to detect the monitor change.

holance avatar Feb 16 '22 19:02 holance

Hi, I found this article.. https://stackoverflow.com/questions/43537990/wpf-clickonce-dpi-awareness-per-monitor-v2 With the step by step description to get the current dpi scale... (6 steps) Complicate for your Lib are steps 2 and 3. But it is working for my windows 10 system and wpf .net 472 or with .net core 6.0 perfect. I attach my example files. Without the manifest and assamblyinfo.cs. It will be a nice to have...

Thanks for your great toolkit. WpfApp.zip

gregorsGit avatar Feb 17 '22 14:02 gregorsGit