ITextProvider.GetVisibleRanges Method
[ 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.
Assembly: System.Windows (in System.Windows.dll)
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.