how do I get the real Position (in Pixels) of a WPF-Window?
this.PointFromScreen( new Point( 0, 0 ) );
does not gives real Position on Screen when I use DPI of 150% for Font. I guess this has something to do with scaling, but in my case I need the "real" position on Screen.
I think you want PointToScreen
. PointFromScreen
converts screen coordinates into the coordinate system of the Visual
.
var window = new Window();
Point screenCoordinates = window.PointToScreen(new Point(0,0));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With