ITextRangeProvider 接口

定义

公开方法和属性,以支持客户端对实现 ITextProvider 的文本容器中连续文本范围的UI 自动化访问。

public interface class ITextRangeProvider
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("5347ad7b-c355-46f8-aff5-909033582f63")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface ITextRangeProvider
public interface ITextRangeProvider
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Runtime.InteropServices.Guid("5347ad7b-c355-46f8-aff5-909033582f63")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type ITextRangeProvider = interface
type ITextRangeProvider = interface
Public Interface ITextRangeProvider
属性

注解

在必须支持 TextPattern 控件模式的UI 自动化提供程序上实现。

A TextPatternRange 可以表示容器中的 TextPattern 插入点、子集或所有文本。

方法

名称 说明
AddToSelection()

添加到支持多个不连续选择的文本容器中突出显示文本的集合。

Clone()

返回与原始ITextRangeProvider属性相同的新ITextRangeProvider属性,并继承原始属性。

Compare(ITextRangeProvider)

返回一个值,该值指示文本范围的跨度( Start 终结点 End 到终结点)是否与另一个文本范围相同。

CompareEndpoints(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

返回一个值,该值指定两个文本范围是否具有相同的终结点。

ExpandToEnclosingUnit(TextUnit)

将文本范围扩展到指定的文本单元。

FindAttribute(Int32, Object, Boolean)

返回具有指定属性值的文本范围子集。

FindText(String, Boolean, Boolean)

返回包含指定文本的文本范围子集。

GetAttributeValue(Int32)

检索文本范围中指定属性的值。

GetBoundingRectangles()

检索文本范围中每个完全或部分可见文本行的边框集合。

GetChildren()

检索属于文本范围内的所有嵌入对象的集合。

GetEnclosingElement()

返回包含文本范围的最内部控件。

GetText(Int32)

检索范围的纯文本。

Move(TextUnit, Int32)

移动指定的文本单位数的文本范围。

MoveEndpointByRange(TextPatternRangeEndpoint, ITextRangeProvider, TextPatternRangeEndpoint)

将文本范围的一个终结点移到第二个文本范围的指定终结点。

MoveEndpointByUnit(TextPatternRangeEndpoint, TextUnit, Int32)

移动文档范围内的指定文本单位数的文本范围的一个终结点。

RemoveFromSelection()

从支持多个不同选择的文本容器中突出显示的文本集合中删除与调用方 StartEnd 终结点相对应的突出显示文本部分。

ScrollIntoView(Boolean)

使文本控件垂直滚动,直到文本范围在视区中可见。

Select()

突出显示与文本范围 StartEnd 终结点相对应的文本控件中的文本。

适用于

另请参阅