ITextProvider.RangeFromPoint Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

Syntax

Function RangeFromPoint ( _
    screenLocation As Point _
) As ITextRangeProvider
ITextRangeProvider RangeFromPoint(
    Point screenLocation
)

Parameters

Return Value

Type: System.Windows.Automation.Provider..::.ITextRangeProvider
A degenerate range nearest the specified location. This method never returns nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

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.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

ITextProvider Interface

System.Windows.Automation.Provider Namespace

ITextRangeProvider