TouchPoint.Position Property

Gets the X,Y coordinate position of the touch point as a Point.

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

public Point Position { get; }

Property Value

Type: System.Windows.Point
A Point value that reports the coordinate position of the touch point.

The Position property reports the exact center of the contact area for a touch point. To get a bounding box for a particular TouchPoint, you can center a bounding box on the Position point and then base the dimensions of that bounding box on the Size property.

If you want to calculate an offset from a particular UI element, you can pass that element as the input for either GetPrimaryTouchPoint or GetTouchPoints as part of your touch input-event handling that generates the TouchPoint. Using the UI element input results in a TouchPoint that has relative coordinates for its Position and the coordinates are already calculated relative to the offset. Otherwise, to use the general coordinate reference of the overall Silverlight content area, pass null for the input of GetPrimaryTouchPoint or GetTouchPoints.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

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

Community Additions

ADD
Show: