Delen via


ITextProvider2 Interface

Definition

Extends the ITextProvider interface to enable Microsoft UI Automation providers to expose textual content that is the target of an annotation or selection. Implement this interface in order to support the capabilities that an automation client requests with a GetPattern call and PatternInterface.Text2.

public interface class ITextProvider2 : ITextProvider
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(3743238332, 1159, 20095, 157, 94, 240, 158, 119, 228, 18, 70)]
struct ITextProvider2 : ITextProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(3743238332, 1159, 20095, 157, 94, 240, 158, 119, 228, 18, 70)]
public interface ITextProvider2 : ITextProvider
Public Interface ITextProvider2
Implements ITextProvider
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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 ITextProvider2 pattern doesn't have a Windows Runtime property identifier class.

Interface inheritance

ITextProvider2 inherits ITextProvider. Types that implement ITextProvider2 also implement the interface members of ITextProvider.

Properties

DocumentRange

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

(Inherited from ITextProvider)
SupportedTextSelection

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

(Inherited from ITextProvider)

Methods

GetCaretRange(Boolean)

Retrieves a zero-length text range at the location of the caret that belongs to the text-based control.

GetSelection()

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

(Inherited from ITextProvider)
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.

(Inherited from ITextProvider)
RangeFromAnnotation(IRawElementProviderSimple)

Exposes a text range that contains the text that is the target of the annotation associated with the specified annotation element.

RangeFromChild(IRawElementProviderSimple)

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

(Inherited from ITextProvider)
RangeFromPoint(Point)

Retrieves a text range from the vicinity of a screen coordinate.

(Inherited from ITextProvider)

Applies to

See also