GetPosition Method
Collapse the table of content
Expand the table of content

GestureEventArgs.GetPosition Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns the x- and y-coordinates of the pointer position, optionally evaluated against a coordinate origin of a supplied T:System.Windows.UIElement.

Namespace:  System.Windows.Input
Assembly:  System.Windows (in System.Windows.dll)

public Point GetPosition(
	UIElement relativeTo


Type: System.Windows.UIElement
Any UIElement-derived object that is contained by the Windows Phone app and connected to the object tree. To specify the object relative to the overall Windows Phone coordinate system, pass null.

Return Value

Type: System.Windows.Point
A Point that represents the current x- and y-coordinates of the pointer position. If null was passed as relativeTo, this coordinate is for the overall Windows Phone content area. If a non-null relativeTo was passed, this coordinate is relative to the object referenced by relativeTo.

Version Notes

Windows Phone

For information on using manipulations on Windows Phone, see How to handle manipulation events for Windows Phone 8.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

© 2017 Microsoft