testing dpi changes
#10090
Replies: 2 comments 3 replies
-
That looks like a reasonable thing to try. You can pass |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks. With Rect.Empty, the window disappears from the screen and the code gets stuck in an infinite loop. I tried the following instead, which seems to work:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to write automated tests at various dpi settings; also I would like to change the dpi during the test. Changing the dpi of the machine running the tests is cumbersome and fragile, so I would prefer to achieve the same effect inside the test process. Is there a way?
I was thinking of using reflection to call HwndSource.ChangeDpi. Is that a viable solution? Or does something in wpf's guts call native functions that will still be reporting the real dpi?
Which value should I pass as
suggestedRect
to the constructor of HwndDpiChangedEventArgs ?Beta Was this translation helpful? Give feedback.
All reactions