Freigeben über


ITextProvider.GetVisibleRanges Method

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

Retrieves an array of disjoint text ranges from a text container. Each text range begins with the first partially visible line and ends with the last partially visible line.

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

Syntax

'Declaration
Function GetVisibleRanges As ITextRangeProvider()
ITextRangeProvider[] GetVisibleRanges()

Return Value

Type: array<System.Windows.Automation.Provider.ITextRangeProvider[]
The collection of visible text ranges within a container or an empty array. This method never returns nulla null reference (Nothing in Visual Basic).

Remarks

UI Automation providers should ensure that they return, at most, the text ranges that are visible within the container.

Disjoint text ranges may occur when any content of a text container is obscured by an overlapping window or other object, or when a text container with a multicolumn layout has one or more columns that are partially scrolled out of view.

If no text is visible, this method returns a degenerate (empty) text range. An empty range can be returned if the text container is empty or if all text is scrolled out of view.

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.