ContentElement.OnCreateAutomationPeer ContentElement.OnCreateAutomationPeer ContentElement.OnCreateAutomationPeer ContentElement.OnCreateAutomationPeer Method

定義

傳回針對 Windows Presentation Foundation (WPF) 基礎結構的類別特定 AutomationPeer 實作。Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected:
 virtual System::Windows::Automation::Peers::AutomationPeer ^ OnCreateAutomationPeer();
protected virtual System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer ();
abstract member OnCreateAutomationPeer : unit -> System.Windows.Automation.Peers.AutomationPeer
override this.OnCreateAutomationPeer : unit -> System.Windows.Automation.Peers.AutomationPeer
Protected Overridable Function OnCreateAutomationPeer () As AutomationPeer

傳回

因型別而異的 AutomationPeer 實作。The type-specific AutomationPeer implementation.

備註

繼承者注意事項Notes to inheritors

這個方法的實值通常是用來呼叫特定AutomationPeer實作為的函式, 並傳回做為傳回值。The implementation of this method is typically to call the constructor of a specific AutomationPeer implementation, and return it as the return value.

所有ContentElement衍生的類別都應該執行這個方法, 以便將自己的AutomationPeer特定執行方式提供給 WPF 基礎結構。All ContentElement derived classes should implement this method in order to provide their own specific AutomationPeer implementations to the WPF infrastructure. 如需如何執行此模式的詳細AutomationPeer資訊, 請參閱。For details on implementing this pattern, see AutomationPeer.

適用於