public static Point TransformScreenToClient(this HwndSource hwndSource, Point point)
{
HWND hwnd = new HWND(hwndSource.Handle);
POINT pt = new POINT();
pt.x = (int)point.X;
pt.y = (int)point.Y;
NativeMethods.ScreenToClient(hwnd, ref pt);
return new Point(pt.x, pt.y);
}