Поделиться через


ITextProvider.RangeFromPoint Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

'Declaration
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 nulla 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

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

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