This documentation is archived and is not being maintained.

ITextRangeProvider Interface

Exposes methods and properties to support UI Automation client access to a span of continuous text in a text container that implements ITextProvider.

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

public interface ITextRangeProvider

The ITextRangeProvider type exposes the following members.

Public methodAddToSelectionAdds to the collection of highlighted text in a text container that supports multiple, disjoint selections.
Public methodCloneReturns a new ITextRangeProvider identical to the original ITextRangeProvider and inheriting all properties of the original.
Public methodCompareReturns a value that indicates whether the span (the Start endpoint to the End endpoint) of a text range is the same as another text range.
Public methodCompareEndpointsReturns a value that specifies whether two text ranges have identical endpoints.
Public methodExpandToEnclosingUnitExpands the text range to the specified text unit.
Public methodFindAttributeReturns a text range subset that has the specified attribute value.
Public methodFindTextReturns a text range subset that contains the specified text.
Public methodGetAttributeValueRetrieves the value of the specified attribute across the text range.
Public methodGetBoundingRectanglesRetrieves a collection of bounding rectangles for each fully or partially visible line of text in a text range.
Public methodGetChildrenRetrieves a collection of all embedded objects that fall within the text range.
Public methodGetEnclosingElementReturns the innermost control that encloses the text range.
Public methodGetTextRetrieves the plain text of the range.
Public methodMoveMoves the text range the specified number of text units.
Public methodMoveEndpointByRangeMoves one endpoint of a text range to the specified endpoint of a second text range.
Public methodMoveEndpointByUnitMoves one endpoint of the text range the specified number of text units within the document range.
Public methodRemoveFromSelectionRemoves a highlighted section of text, corresponding to the caller's Start and End endpoints, from the collection of highlighted text in a text container that supports multiple, disjoint selections.
Public methodScrollIntoViewCauses the text control to scroll vertically until the text range is visible in the viewport.
Public methodSelectHighlights text in the text control corresponding to the text range Start and End endpoints.

Implemented on a UI Automation provider that must support the TextPattern control pattern.

A TextPatternRange can represent an insertion point, a subset, or all of the text in a TextPattern container.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.