예제 #1
0
파일: Input.cs 프로젝트: kav-it/SharpLib
        public static Point GetCursorPos(UIElement element)
        {
            Point point = GetCursorPos();
            point = element.PointFromScreen(point);

            return point;
        }
예제 #2
0
 /// <summary>
 ///  Calculates the position of the mouse relative to a particular element. 
 /// </summary>
 public Point GetPosition(UIElement relativeTo)
 {
     return relativeTo.PointFromScreen(ScreenPosition);
 }