UIElementAutomationPeer.FromElement(UIElement) 方法

定义

获取指定的 UIElementAutomationPeerUIElement

public:
 static System::Windows::Automation::Peers::AutomationPeer ^ FromElement(System::Windows::UIElement ^ element);
public static System.Windows.Automation.Peers.AutomationPeer FromElement (System.Windows.UIElement element);
static member FromElement : System.Windows.UIElement -> System.Windows.Automation.Peers.AutomationPeer
Public Shared Function FromElement (element As UIElement) As AutomationPeer

参数

element
UIElement

与此 UIElementAutomationPeer 关联的 UIElement

返回

AutomationPeer

返回 UIElementAutomationPeer;如果 UIElementAutomationPeer 方法未创建 CreatePeerForElement(UIElement),则返回 null

适用于