ITextProvider.GetVisibleRanges Method

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)

ITextRangeProvider[] GetVisibleRanges()

Return Value

Type: System.Windows.Automation.Provider.ITextRangeProvider[]
The collection of visible text ranges within a container or an empty array. This method never returns null.

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.


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