ITextProvider 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供方法與屬性,支援 使用者介面自動化 客戶端存取包含文字的控制項。
public interface class 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
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)>]
type ITextProvider = interface
type ITextProvider = interface
Public Interface ITextProvider
- 屬性
備註
實作於必須支援 TextPattern 控制模式的 使用者介面自動化 供應商上。
屬性
| 名稱 | Description |
|---|---|
| DocumentRange |
會取得一個包含文件主文的文字範圍。 |
| SupportedTextSelection |
會獲得一個值,指定文本提供者是否支援選取,若支援,則支援的選取類型。 |
方法
| 名稱 | Description |
|---|---|
| GetSelection() |
擷取與當前文本選擇相關的不相交文字範圍集合。 |
| GetVisibleRanges() |
從一個文字容器中擷取一個不相交的文字範圍陣列,每個文字範圍從第一行部分可見開始,到最後一行部分可見的行末尾。 |
| RangeFromChild(IRawElementProviderSimple) |
擷取包圍子元素(如圖片、超連結或其他嵌入物件)的文字範圍。 |
| RangeFromPoint(Point) |
回傳最接近指定螢幕座標的退化(空)文字範圍。 |