FrameworkElementAutomationPeer.FromElement Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

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

Returns the FrameworkElementAutomationPeer for the specified UIElement.

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

Syntax

Public Shared Function FromElement ( _
    element As UIElement _
) As AutomationPeer
public static AutomationPeer FromElement(
    UIElement element
)

Parameters

Return Value

Type: System.Windows.Automation.Peers..::.AutomationPeer
The FrameworkElementAutomationPeer, or nullNothingnullptra null reference (Nothing in Visual Basic) if the FrameworkElementAutomationPeer was not created by the CreatePeerForElement method.

Exceptions

Exception Condition
ArgumentNullException

element is nullNothingnullptra null reference (Nothing in Visual Basic).

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

FrameworkElementAutomationPeer Class

System.Windows.Automation.Peers Namespace