ITextRangeProvider Interface

Definition

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

public interface class ITextRangeProvider
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("5347ad7b-c355-46f8-aff5-909033582f63")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface ITextRangeProvider
public interface ITextRangeProvider
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Runtime.InteropServices.Guid("5347ad7b-c355-46f8-aff5-909033582f63")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type ITextRangeProvider = interface
type ITextRangeProvider = interface
Public Interface ITextRangeProvider
Attributes

Remarks

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.

Methods

AddToSelection()

Adds to the collection of highlighted text in a text container that supports multiple, disjoint selections.

Clone()

Returns a new ITextRangeProvider identical to the original ITextRangeProvider and inheriting all properties of the original.

Compare(ITextRangeProvider)

Returns 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.

CompareEndpoints(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

Returns a value that specifies whether two text ranges have identical endpoints.

ExpandToEnclosingUnit(TextUnit)

Expands the text range to the specified text unit.

FindAttribute(Int32, Object, Boolean)

Returns a text range subset that has the specified attribute value.

FindText(String, Boolean, Boolean)

Returns a text range subset that contains the specified text.

GetAttributeValue(Int32)

Retrieves the value of the specified attribute across the text range.

GetBoundingRectangles()

Retrieves a collection of bounding rectangles for each fully or partially visible line of text in a text range.

GetChildren()

Retrieves a collection of all embedded objects that fall within the text range.

GetEnclosingElement()

Returns the innermost control that encloses the text range.

GetText(Int32)

Retrieves the plain text of the range.

Move(TextUnit, Int32)

Moves the text range the specified number of text units.

MoveEndpointByRange(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

Moves one endpoint of a text range to the specified endpoint of a second text range.

MoveEndpointByUnit(TextPatternRangeEndpoint, TextUnit, Int32)

Moves one endpoint of the text range the specified number of text units within the document range.

RemoveFromSelection()

Removes 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.

ScrollIntoView(Boolean)

Causes the text control to scroll vertically until the text range is visible in the viewport.

Select()

Highlights text in the text control corresponding to the text range Start and End endpoints.

Applies to

See also