ITextProvider 介面

定義

公開方法和屬性,以支援包含文字之控制項的使用者介面自動化用戶端存取。Exposes methods and properties to support UI Automation client access to controls that contain text.

public interface class ITextProvider
public interface ITextProvider
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("3589c92c-63f3-4367-99bb-ada653b77cf2")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface ITextProvider
type ITextProvider = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Runtime.InteropServices.Guid("3589c92c-63f3-4367-99bb-ada653b77cf2")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type ITextProvider = interface
Public Interface ITextProvider
屬性

備註

在必須支援控制項模式的消費者介面自動化提供者上執行 TextPatternImplemented on a UI Automation provider that must support the TextPattern control pattern.

屬性

DocumentRange

取得包含文件主要文字的文字範圍。Gets a text range that encloses the main text of a document.

SupportedTextSelection

取得值,可指定文字提供者是否支援選取範圍;如果支援,則指定支援的選取範圍類型。Gets a value that specifies whether a text provider supports selection and, if so, the type of selection supported.

方法

GetSelection()

擷取與目前文字選取範圍關聯之斷續文字範圍的集合。Retrieves a collection of disjoint text ranges associated with the current text selection or selections.

GetVisibleRanges()

從文字容器擷取斷續文字範圍的陣列,其中每一個文字範圍都以第一個局部可見行開頭,一直到最後一個局部可見行的尾端為止。Retrieves an array of disjoint text ranges from a text container where each text range begins with the first partially visible line through to the end of the last partially visible line.

RangeFromChild(IRawElementProviderSimple)

擷取包含子項目 (例如影像、超連結或其他內嵌物件) 的文字範圍。Retrieves a text range enclosing a child element such as an image, hyperlink, or other embedded object.

RangeFromPoint(Point)

傳回最接近指定之螢幕座標的變質 (空) 文字範圍。Returns the degenerate (empty) text range nearest to the specified screen coordinates.

適用於

另請參閱