How to get the Absolute Position of the Mouse on the Screen
You can callMouse.GetPosition(this)
on any WPF element. This function returns the relative offset of the mouse to the upper left corner of your control.To get the absolute screen cordinates, call the
PointToScreen()
function.Point absoluteScreenPos = PointToScreen( Mouse.GetPosition( new Point(), this ));
No comments:
Post a Comment