TouchHitTestingEventArgs TouchHitTestingEventArgs TouchHitTestingEventArgs Class

Definition

Contains the arguments returned by the TouchHitTesting event.

public sealed class TouchHitTestingEventArgspublic sealed class TouchHitTestingEventArgsPublic NotInheritable Class TouchHitTestingEventArgs
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Note

: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).

Properties

BoundingBox BoundingBox BoundingBox BoundingBox

Gets the bounding rectangle of the touch contact area.

public Rect BoundingBox { get; }public Rect BoundingBox { get; }Public ReadOnly Property BoundingBox As Rectpublic Rect BoundingBox { get; }
Value
Rect Rect Rect

Bounding rectangle of the touch contact area.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The bounding rectangle is the area in which valid touch targets will be identified and ranked.

Note

This bounding box may differ from the contact area reported by the digitizer when: + The digitizer reports a touch contact area that is outside the maximum or minimum size threshold recognized by Touch Hit Testing.

  • A portion of the touch contact area is occluded by another object higher in the z-order.

Handled Handled Handled Handled

Gets or sets a value indicating whether the TouchHitTesting event was handled.

public bool Handled { get; set; }public bool Handled { get; set; }Public ReadWrite Property Handled As boolpublic bool Handled { get; set; }
Value
bool bool bool

True if the event is handled; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Point Point Point Point

Gets the screen coordinates of the touch point reported by the touch digitizer.

public Point Point { get; }public Point Point { get; }Public ReadOnly Property Point As Pointpublic Point Point { get; }
Value
Point Point Point

Screen position of the input pointer, in device-independent pixel (DIP).

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ProximityEvaluation ProximityEvaluation ProximityEvaluation ProximityEvaluation

Gets or sets the proximity evaluation score for an object relative to the touch contact area.

public CoreProximityEvaluation ProximityEvaluation { get; set; }public CoreProximityEvaluation ProximityEvaluation { get; set; }Public ReadWrite Property ProximityEvaluation As CoreProximityEvaluationpublic CoreProximityEvaluation ProximityEvaluation { get; set; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

EvaluateProximity(Point[]) EvaluateProximity(Point[]) EvaluateProximity(Point[]) EvaluateProximity(Point[])

Returns a ranking for the polygon as the probable touch target and an adjusted touch point within the polygon. The rank is determined through a comparison of targeting heuristics for all polygons that intersect the touch contact area.

public CoreProximityEvaluation EvaluateProximity(Point[] controlVertices)public CoreProximityEvaluation EvaluateProximity(Point[] controlVertices)Public Function EvaluateProximity(controlVertices As Point[]) As CoreProximityEvaluationpublic CoreProximityEvaluation EvaluateProximity(Point[] controlVertices)
Parameters
controlVertices
Windows.Foundation.Point[] Windows.Foundation.Point[] Windows.Foundation.Point[]

The array of x-y screen coordinates that define the shape of the UI element (the number of vertices in the polygon). This value must be greater than or equal to 3.

Returns

The CoreProximityEvaluation structure that holds the rank and adjusted touch point data.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

EvaluateProximity(Rect) EvaluateProximity(Rect) EvaluateProximity(Rect) EvaluateProximity(Rect)

Returns a ranking for the rectangle as the probable touch target and an adjusted touch point within the rectangle. The rank is determined through a comparison of targeting heuristics for all rectangles that intersect the touch contact area.

public CoreProximityEvaluation EvaluateProximity(Rect controlBoundingBox)public CoreProximityEvaluation EvaluateProximity(Rect controlBoundingBox)Public Function EvaluateProximity(controlBoundingBox As Rect) As CoreProximityEvaluationpublic CoreProximityEvaluation EvaluateProximity(Rect controlBoundingBox)
Parameters
controlBoundingBox
Rect Rect Rect

The Rect that defines the bounding box of the UI element.

Returns

The CoreProximityEvaluation structure that holds the rank and adjusted touch point data.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)