ITextProvider2 interface
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.
Syntax
Attributes
- GuidAttribute("df1d48bc-0487-4e7f-9d5e-f09e77e41246")
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The ITextProvider2 interface has these types of members:
Methods
The ITextProvider2 interface has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| 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. |
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. 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.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
- Text and TextRange Control Patterns
- Custom automation peers
- ITextProvider2 (COM interface)
- ITextProvider
Build date: 12/4/2012
