ControlAutomationPeerCreatePeerForElement Method

Gets the AutomationPeer for a Control, creating it if necessary.

Definition

Namespace: Avalonia.Automation.Peers
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public static AutomationPeer CreatePeerForElement(
	Control element
)

Parameters

element  Control
The control.

Return Value

AutomationPeer
The automation peer.

Remarks

Despite the name (which comes from the analogous WPF API), this method does not create a new peer if one already exists: instead it returns the existing peer.

See Also