ITextProvider.RangeFromPoint Method

Returns the degenerate (empty) text range that is nearest to the specified screen coordinates.

Namespace:  System.Windows.Automation.Provider
Assembly:  System.Windows (in System.Windows.dll)

ITextRangeProvider RangeFromPoint(
	Point screenLocation


Type: System.Windows.Point
The location, in screen coordinates.

Return Value

Type: System.Windows.Automation.Provider.ITextRangeProvider
A degenerate range nearest the specified location. This method never returns null.

A text range that encloses a child object is returned if the screen coordinates are within the coordinates of an image, hyperlink, or other embedded object.

Because hidden text is not ignored by RangeFromPoint, this method returns a degenerate range from the visible text that is nearest the specified point.


Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

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

Community Additions