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.
The ITextProvider2 interface has these types of members:
The ITextProvider2 interface has these methods. It also inherits methods from the Object class.
|GetCaretRange||Retrieves a zero-length text range at the location of the caret that belongs to the text-based control.|
|RangeFromAnnotation||Exposes a text range that contains the text that is the target of the annotation associated with the specified annotation element.|
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. The text models supported by Windows Runtime text controls such as TextBox and RichTextBlock don't use these patterns. The interfaces 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 ITextProvider2 pattern doesn't have a pattern property identifier class.
Minimum supported client
Minimum supported server
|Windows Server 2012|
- Text and TextRange Control Patterns
- Custom automation peers
- ITextProvider2 (COM interface)
Build date: 12/4/2012