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

GestureEventArgs.GetPosition Method


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 Silverlight plug-in and connected to the object tree. To specify the object relative to the overall Silverlight coordinate system, pass null.

Return Value

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

Version Notes

Silverlight for the desktop

Do not use for a Silverlight for the desktop application.

Silverlight for Windows Phone Silverlight for Windows Phone

For information on using manipulations on Silverlight for Windows Phone, see How to: Handle Manipulation Events.

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2016 Microsoft