c# - How to convert WPF MouseDevice.GetPosition(null) to screen coordinates? -


How you can change System.Windows.Point, which is returned by mouse device. Gateptation (empty), which is a WPF window in screen coordinates.

This hack is ( ) but it is almost two years old and will only work under certain restrictions. As stated in the article that it is not trivial to be correct, it is possible that I would like to trust the WPF method.

I am using .NET Framework 4.0, so I'm not worried about the previous compatibility .NET Framework Version.

You need it:

It's called on a control and passes it (0, 0), so it gives you the top-left corner of the control in the screen coordinates.

Or you can pass it (real-life, realhite) and you will find the bottom right corner.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -