TouchHitTestingEventArgs TouchHitTestingEventArgs TouchHitTestingEventArgs TouchHitTestingEventArgs Class

Definition

Contains the arguments returned by the TouchHitTesting event.

public : sealed class TouchHitTestingEventArgs : ICoreWindowEventArgs, ITouchHitTestingEventArgs
public sealed class TouchHitTestingEventArgs : ICoreWindowEventArgs, ITouchHitTestingEventArgs
Public NotInheritable Class TouchHitTestingEventArgs Implements ICoreWindowEventArgs, ITouchHitTestingEventArgs
// This class does not provide a public constructor.
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 Rect
var rect = touchHitTestingEventArgs.boundingBox;
Value
Rect Rect Rect Rect

Bounding rectangle of the touch contact area.

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 : Platform::Boolean Handled { get; set; }
public bool Handled { get; set; }
Public ReadWrite Property Handled As bool
var bool = touchHitTestingEventArgs.handled;
touchHitTestingEventArgs.handled = bool;
Value
Platform::Boolean bool bool bool

True if the event is handled; otherwise, false.

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 Point
var point = touchHitTestingEventArgs.point;
Value
Point Point Point Point

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

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 CoreProximityEvaluation
var coreProximityEvaluation = touchHitTestingEventArgs.proximityEvaluation;
touchHitTestingEventArgs.proximityEvaluation = coreProximityEvaluation;

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 CoreProximityEvaluation
var coreProximityEvaluation = touchHitTestingEventArgs.evaluateProximity(controlVertices);
Parameters
controlVertices
Point[] Point[] Point[] 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
See Also

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 CoreProximityEvaluation
var coreProximityEvaluation = touchHitTestingEventArgs.evaluateProximity(controlBoundingBox);
Parameters
controlBoundingBox
Rect Rect Rect Rect

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

Returns
See Also