Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UIElement.OnCreateAutomationPeer Method

When implemented in a derived class, returns class-specific AutomationPeer implementations for the Silverlight automation infrastructure.

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

'Declaration
Protected Overridable Function OnCreateAutomationPeer As AutomationPeer

Return Value

Type: System.Windows.Automation.Peers.AutomationPeer
The class-specific AutomationPeer subclass to return.

Classes that participate in the Silverlight automation infrastructure must implement this method to return a class-specific derived class of AutomationPeer that reports information for automation behavior. See UI Automation of a Silverlight Custom Control.

Version Notes

Silverlight for the desktop

 Some events are only available if you are targeting Silverlight for Windows Phone. If you attempt to add handlers for such events to code targeting Silverlight 4, either through explicit AddHandler(RoutedEvent, Delegate, Boolean) calls or by declaring events in XAML, the target runtime throws a NotImplementedException.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2016 Microsoft