AutomationPeer.GetHostRawElementProviderCore 方法

定義

告訴消費者介面自動化消費者介面自動化樹狀結構 hwnd 中放置Windows Presentation Foundation (WPF) 專案所裝載的 。

protected:
 virtual System::Windows::Automation::Peers::HostedWindowWrapper ^ GetHostRawElementProviderCore();
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
protected virtual System.Windows.Automation.Peers.HostedWindowWrapper GetHostRawElementProviderCore ();
protected virtual System.Windows.Automation.Peers.HostedWindowWrapper GetHostRawElementProviderCore ();
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
abstract member GetHostRawElementProviderCore : unit -> System.Windows.Automation.Peers.HostedWindowWrapper
override this.GetHostRawElementProviderCore : unit -> System.Windows.Automation.Peers.HostedWindowWrapper
abstract member GetHostRawElementProviderCore : unit -> System.Windows.Automation.Peers.HostedWindowWrapper
override this.GetHostRawElementProviderCore : unit -> System.Windows.Automation.Peers.HostedWindowWrapper
Protected Overridable Function GetHostRawElementProviderCore () As HostedWindowWrapper

傳回

這個方法會針對主 hwnd 控物件的控制項傳回裝載 hwnd 至消費者介面自動化。

屬性

備註

這個方法會針對主 hwnd 控物件的控制項傳回裝載 hwnd 至消費者介面自動化。

AutomationPeer 緊接 hwnd 裝載 的 元素相關聯的 必須覆寫這個方法。

如果未覆寫這個方法,消費者介面自動化會將 放置 hwnd 為裝載整個應用程式的 子項目 HwndSource 。 一般而言,您想要覆寫此預設行為,並將消費者介面自動化設定為將裝載 hwnd 的平行位置放在WINDOWS PRESENTATION FOUNDATION (WPF) 邏輯樹狀結構中的位置。

除了裝載案例之外,不允許 AutomationPeer 類型覆寫此方法。

除了覆寫這個方法之外, AutomationPeer 與緊 hwnd 接裝載 之元素相關聯的型別必須傳回 IRawElementProviderSimpleAutomationPeer ,以回應WM_GETOBJECT傳入裝載 hwnd 的 。

若要取得 的 IRawElementProviderSimple 指標,請呼叫 HostProviderFromHandle

適用於

另請參閱