MouseEventArgs::GetPosition Method (IInputElement^)
.NET Framework (current version)
Returns the position of the mouse pointer relative to the specified element.
Assembly: PresentationCore (in PresentationCore.dll)
Parameters
- relativeTo
-
Type:
System.Windows::IInputElement^
The element to use as the frame of reference for calculating the position of the mouse pointer.
Return Value
Type: System.Windows::PointThe x- and y-coordinates of the mouse pointer position relative to the specified object.
The point (0,0) is the upper-left corner of the frame of reference.
The static Mouse::GetPosition method can also be used to obtain the position of the mouse.
.NET Framework
Available since 3.0
Available since 3.0
Show: