VisualTreeHelper.FindElementsInHostCoordinates Method (Point, Window)


Retrieves a set of objects that are located within a specified point of a window's coordinate space.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

Public Shared Function FindElementsInHostCoordinates ( _
	intersectingPoint As Point, _
	window As Window _
) As IEnumerable(Of UIElement)


Type: System.Windows.Point
The point to use as the determination point.
Type: System.Windows.Window
The window to search within.

Return Value

Type: System.Collections.Generic.IEnumerable(Of UIElement)
An enumerable set of UIElement objects that are determined to be located in the visual tree composition at the specified point and within the specified window.

You must specify some window for the window value to specify a frame of reference.

For most operations, you will generally be interested only in the first UIElement in the set, which is the element that is visually the topmost rendered element for the visual composition. Any other objects in the collection do not correspond to what would be reported as the source if the user clicked that point area (for instance the user clicked on an enabled and focusable control).

FindElementsInHostCoordinates is fundamentally similar to the HitTest methods in previous versions of Silverlight and in WPF.


Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions