ITextRangeProvider ITextRangeProvider ITextRangeProvider ITextRangeProvider Interface

Definition

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

public : interface ITextRangeProvider
struct winrt::Windows::UI::Xaml::Automation::Provider::ITextRangeProvider
public interface ITextRangeProvider
Public Interface ITextRangeProvider
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For more info on this pattern, see Text and TextRange Control Patterns.

ITextProvider, ITextProvider2 and ITextRangeProvider aren't implemented by any existing Windows Runtime automation peers using this definition of the interface. The text models supported by Windows Runtime text controls such as TextBox and RichTextBlock do implement some of these patterns, but do so at a native level that doesn't appear in the Windows Runtime definitions of the API surface. For more info, see the peer classes for the various Windows Runtime text controls.

The ITextRangeProvider pattern doesn't have a Windows Runtime property identifier class.

Methods

AddToSelection() AddToSelection() AddToSelection() AddToSelection()

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

Clone() Clone() Clone() Clone()

Returns a new ITextRangeProvider that is identical to the original ITextRangeProvider and that inherits all the properties of the original.

Compare(ITextRangeProvider) Compare(ITextRangeProvider) Compare(ITextRangeProvider) Compare(ITextRangeProvider)

Returns a value that indicates whether the start and end points of a text range are the same as another text range.

CompareEndpoints(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint) CompareEndpoints(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint) CompareEndpoints(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint) CompareEndpoints(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

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

ExpandToEnclosingUnit(TextUnit) ExpandToEnclosingUnit(TextUnit) ExpandToEnclosingUnit(TextUnit) ExpandToEnclosingUnit(TextUnit)

Expands the text range to the specified text unit.

FindAttribute(Int32, Object, Boolean) FindAttribute(Int32, Object, Boolean) FindAttribute(Int32, Object, Boolean) FindAttribute(Int32, Object, Boolean)

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

FindText(String, Boolean, Boolean) FindText(String, Boolean, Boolean) FindText(String, Boolean, Boolean) FindText(String, Boolean, Boolean)

Returns a text range subset that contains the specified text.

GetAttributeValue(Int32) GetAttributeValue(Int32) GetAttributeValue(Int32) GetAttributeValue(Int32)

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

GetBoundingRectangles(Double[]) GetBoundingRectangles(Double[]) GetBoundingRectangles(Double[]) GetBoundingRectangles(Double[])

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

GetChildren() GetChildren() GetChildren() GetChildren()

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

GetEnclosingElement() GetEnclosingElement() GetEnclosingElement() GetEnclosingElement()

Returns the innermost element that encloses the text range.

GetText(Int32) GetText(Int32) GetText(Int32) GetText(Int32)

Retrieves the plain text of the range.

Move(TextUnit, Int32) Move(TextUnit, Int32) Move(TextUnit, Int32) Move(TextUnit, Int32)

Moves the text range the specified number of text units.

MoveEndpointByRange(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint) MoveEndpointByRange(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint) MoveEndpointByRange(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint) MoveEndpointByRange(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

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

MoveEndpointByUnit(TextPatternRangeEndpoint, TextUnit, Int32) MoveEndpointByUnit(TextPatternRangeEndpoint, TextUnit, Int32) MoveEndpointByUnit(TextPatternRangeEndpoint, TextUnit, Int32) MoveEndpointByUnit(TextPatternRangeEndpoint, TextUnit, Int32)

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

RemoveFromSelection() RemoveFromSelection() RemoveFromSelection() RemoveFromSelection()

From the collection of highlighted text in a text container that supports multiple disjoint selections, removes a highlighted section of text that corresponds to the caller's text range endpoints.

ScrollIntoView(Boolean) ScrollIntoView(Boolean) ScrollIntoView(Boolean) ScrollIntoView(Boolean)

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

Select() Select() Select() Select()

Highlights text in the text control that corresponds to the start and end endpoints of the text range.

See Also