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衍生的類別應該實作這個方法,以提供自己的特定AutomationPeerWPF 基礎結構的實作。All ContentElement derived classes should implement this method in order to provide their own specific AutomationPeer implementations to the WPF infrastructure. 如需實作此模式的詳細資訊,請參閱AutomationPeerFor details on implementing this pattern, see AutomationPeer.

適用於