共用方式為


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

適用於