Windows Dev Center

Expand Minimize

UIElement.FindSubElementsForTouchTargeting method

Enables a UIElement subclass to expose child elements that assist with resolving touch targeting.

Syntax


Protected Overridable Function FindSubElementsForTouchTargeting(
  point As Point,  
  boundingRect As Rect 
) As IEnumerable(Of IEnumerable)

Parameters

point

Type: Point

The point being touched.

boundingRect

Type: Rect

The bounds used for touch tolerance.

Return value

Type: IIterable<IIterable> [C++] | System.Collections.Generic.IEnumerable<IIterable> [.NET]

A set of point sets. These represent the vertices of sub elements that are intersected by the given touch point (plus tolerance).

Remarks

Points in the list are in descending z-order: topmost in the rendering stack appears first in the list.

FindElementsInHostCoordinates is a similar static-class helper method that is also used for hit testing and general object tree examination. However, FindSubElementsForTouchTargeting adds the refinement of a Rect input to use for touch tolerance.

If you are programming using C# or Microsoft Visual Basic, the return value type of this method is projected as an IEnumerable generic collection that contains UIElement items. If you are programming using Visual C++ component extensions (C++/CX), the return type of this method is IIterable<UIElement>.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

UIElement
Quickstart: Touch input
FindElementsInHostCoordinates

 

 

Show:
© 2015 Microsoft