AutomationElement.FromLocalProvider(IRawElementProviderSimple) 方法

定義

從本機 AutomationElement 實作擷取新的 IRawElementProviderSimple 物件。Retrieves a new AutomationElement object from a local IRawElementProviderSimple implementation.

public:
 static System::Windows::Automation::AutomationElement ^ FromLocalProvider(System::Windows::Automation::Provider::IRawElementProviderSimple ^ localImpl);
public static System.Windows.Automation.AutomationElement FromLocalProvider (System.Windows.Automation.Provider.IRawElementProviderSimple localImpl);
static member FromLocalProvider : System.Windows.Automation.Provider.IRawElementProviderSimple -> System.Windows.Automation.AutomationElement
Public Shared Function FromLocalProvider (localImpl As IRawElementProviderSimple) As AutomationElement

參數

localImpl
IRawElementProviderSimple

提供者物件。The provider object.

傳回

AutomationElement

AutomationElement,代表由提供者物件提供的元素。An AutomationElement that represents the element served by the provider object.

備註

用戶端協助程式程式庫可以使用這個方法,讓它的呼叫端存取自己的原生專案型別。This method might be used by a client helper library to enable its callers to access its own native element type. 例如,WPF 會在內部使用這個方法,讓它可以將傳回的 AutomationElement 用戶端想要直接從取得消費者介面自動化專案 UIElementFor example, WPF uses this method internally so that it can return an AutomationElement to clients that want to get a UI Automation element directly from a UIElement.

適用於