Version

FindElementInDirection(FindDirection,FindElementEvaluator) Method

Find the closest element to this one in the element's control element base on the criteria defined by the evaluator.
Syntax
'Declaration
 
Public Overloads Shared Function FindElementInDirection( _
   ByVal direction As FindDirection, _
   ByVal evaluator As FindElementEvaluator _
) As UIElement
public static UIElement FindElementInDirection( 
   FindDirection direction,
   FindElementEvaluator evaluator
)

Parameters

direction
The direction in which the find operation should look.
evaluator
The class that defines the search criteria for the find operation.

Return Value

The best matching element found, or null if no element was found.
Remarks

The distance between elements is measured only in the direction of the search operation.

The element found must overlap this element when moving in the direction of the find operation.

The element found is only allowed to overlap this element in the direction of the find operation by the amount specified by the evaluator.

If there are two elements found with the same distance to this element, the element whose edge is closest to the center line drawn thourgh this element in the direction of the find operation is chosen.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also