TouchHitTestingEventArgs TouchHitTestingEventArgs TouchHitTestingEventArgs Class

Contains the arguments returned by the TouchHitTesting event.

Syntax

Declaration

public sealed class TouchHitTestingEventArgspublic sealed class TouchHitTestingEventArgsPublic NotInheritable Class TouchHitTestingEventArgs

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 summary

Gets the bounding rectangle of the touch contact area.

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

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

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

Methods summary

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.

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.

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; }

    Property Value

    • 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 bool Handled { get; set; }public bool Handled { get; set; }Public ReadWrite Property Handled As boolpublic bool Handled { get; set; }

    Property Value

    • 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 Pointpublic Point Point { get; }

    Property Value

    • 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 CoreProximityEvaluationpublic CoreProximityEvaluation ProximityEvaluation { get; set; }

    Property Value

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

  • 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

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

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Core.dll