Export (0) Print
Expand All

ITextProvider.RangeFromPoint Method

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

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

ITextRangeProvider RangeFromPoint(
	Point screenLocation
)

Parameters

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. A null reference (Nothing in Microsoft Visual Basic .NET) is never returned.

ExceptionCondition
ArgumentException

If a given point is outside the UI Automation element associated with the text pattern.

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 a degenerate range from the visible text closest to the given point is returned.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft