ITextProvider interface

Applies to Windows and Windows Phone

Exposes methods and properties to support Microsoft UI Automation client access to controls that contain text. Implement this interface in order to support the capabilities that an automation client requests with a GetPattern call and PatternInterface.Text.

Syntax


public interface ITextProvider

Attributes

[Version(0x06020000)]
[WebHostHidden()]

Members

The ITextProvider interface has these types of members:

Methods

The ITextProvider interface has these methods. It also inherits methods from the Object class.

MethodDescription
GetSelection Retrieves a collection of disjoint text ranges that are associated with the current text selection or selections.
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.
RangeFromChild Retrieves a text range that encloses a child element, such as an image, hyperlink, or other embedded object.
RangeFromPoint Retrieves a text range from the vicinity of a screen coordinate.

 

Properties

The ITextProvider interface has these properties.

PropertyAccess typeDescription

DocumentRange

Read-onlyGets a text range that encloses the main text of a document.

SupportedTextSelection

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

 

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 UI Automation interfaces within the Windows Runtime API exist so that custom control authors can support the automation pattern in a custom control, and implement their automation support using the same Windows Runtime managed or C++ APIs as they use to define control logic or other automation support.

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

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Automation.Provider
Windows::UI::Xaml::Automation::Provider [C++]

Metadata

Windows.winmd

See also

Text and TextRange Control Patterns
ITextProvider (COM interface)
Custom automation peers

 

 

Show:
© 2014 Microsoft