GetVisibleRanges Method
Collapse the table of content
Expand the table of content

ITextProvider.GetVisibleRanges 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. ]

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft