Show / Hide Table of Contents

Interface ITextProvider

Exposes methods and properties to support UI Automation client access to controls that contain text.

Namespace: System.Windows.Automation.Provider
Assembly: OpenSilver.dll
Syntax
public interface ITextProvider

Properties

| Improve this Doc View Source

DocumentRange

Gets a text range that encloses the main text of a document.

Declaration
ITextRangeProvider DocumentRange { get; }
Property Value
Type Description
ITextRangeProvider

A text range that encloses the main text of a document.

| Improve this Doc View Source

SupportedTextSelection

Gets a value that specifies whether a text provider supports selection, and if it does, the type of selection that is supported.

Declaration
SupportedTextSelection SupportedTextSelection { get; }
Property Value
Type Description
SupportedTextSelection

A value of SupportedTextSelection.

Methods

| Improve this Doc View Source

GetSelection()

Retrieves a collection of disjoint text ranges that are associated with the current text selection or selections.

Declaration
ITextRangeProvider[] GetSelection()
Returns
Type Description
ITextRangeProvider[]

A collection of disjoint text ranges.

Exceptions
Type Condition
System.InvalidOperationException

If the UI Automation provider does not support text selection.

| Improve this Doc View Source

GetVisibleRanges()

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.

Declaration
ITextRangeProvider[] GetVisibleRanges()
Returns
Type Description
ITextRangeProvider[]

The collection of visible text ranges within a container or an empty array. This method never returns null.

| Improve this Doc View Source

RangeFromChild(IRawElementProviderSimple)

Retrieves a text range that encloses a child element, such as an image, hyperlink, or other embedded object.

Declaration
ITextRangeProvider RangeFromChild(IRawElementProviderSimple childElement)
Parameters
Type Name Description
IRawElementProviderSimple childElement

The enclosed object.

Returns
Type Description
ITextRangeProvider

A range that spans the child element.

| Improve this Doc View Source

RangeFromPoint(Point)

Returns the degenerate (empty) text range that is nearest to the specified screen coordinates.

Declaration
ITextRangeProvider RangeFromPoint(Point screenLocation)
Parameters
Type Name Description
Point screenLocation

The location, in screen coordinates.

Returns
Type Description
ITextRangeProvider

A degenerate range nearest the specified location. This method never returns null.

  • Improve this Doc
  • View Source