Share via


ITextProvider.RangeFromChild(IRawElementProviderSimple) 方法

定義

擷取包含子項目 (例如影像、超連結或其他內嵌物件) 的文字範圍。

public:
 System::Windows::Automation::Provider::ITextRangeProvider ^ RangeFromChild(System::Windows::Automation::Provider::IRawElementProviderSimple ^ childElement);
public System.Windows.Automation.Provider.ITextRangeProvider RangeFromChild (System.Windows.Automation.Provider.IRawElementProviderSimple childElement);
abstract member RangeFromChild : System.Windows.Automation.Provider.IRawElementProviderSimple -> System.Windows.Automation.Provider.ITextRangeProvider
Public Function RangeFromChild (childElement As IRawElementProviderSimple) As ITextRangeProvider

參數

childElement
IRawElementProviderSimple

包含的物件。

傳回

ITextRangeProvider

跨越子項目的範圍。

例外狀況

如果子項目是 Null 參考 (在 Visual Basic 中為 Nothing)。

備註

消費者介面自動化提供者應該檢查傳遞的專案是否為文字容器的子系。

如果子專案存在的範圍中沒有文字,則會傳回空) 範圍的變質 (。

參數 childElement 是與 TextPattern 相關聯之 的 AutomationElement 子系,或是 從 的子 TextPatternRange 係數組。

適用於

另請參閱