OnCreateAutomationPeer Method
Collapse the table of content
Expand the table of content

TextElement.OnCreateAutomationPeer Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns a class-specific AutomationPeer implementation for use by the Windows Phone automation infrastructure.

Namespace:  System.Windows.Documents
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Protected Overridable Function OnCreateAutomationPeer As AutomationPeer

Return Value

Type: System.Windows.Automation.Peers.AutomationPeer
A type-specific AutomationPeer for the TextElement object.

Notes to Inheritors

The implementation of this method is typically to call the constructor of a specific AutomationPeer implementation, and return it as the return value.

All TextElement derived classes should implement this method in order to provide their own specific AutomationPeer implementations to the Windows Phone infrastructure. For details on implementing this pattern, see AutomationPeer.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft