Table of Contents

Class ControlAutomationPeer

Namespace
Avalonia.Automation.Peers
Assembly
Avalonia.Controls.dll

An automation peer which represents a Control element.

public class ControlAutomationPeer : AutomationPeer
Inheritance
ControlAutomationPeer
Derived
Inherited Members

Constructors

ControlAutomationPeer(Control)

public ControlAutomationPeer(Control owner)

Parameters

owner Control

Properties

Owner

public Control Owner { get; }

Property Value

Control

Methods

BringIntoViewCore()

protected override void BringIntoViewCore()

CreatePeerForElement(Control)

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

public static AutomationPeer CreatePeerForElement(Control element)

Parameters

element Control

The control.

Returns

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.

FromElement(Control)

Gets an existing AutomationPeer for a Control.

public static AutomationPeer? FromElement(Control element)

Parameters

element Control

The control.

Returns

AutomationPeer

The automation peer if already created; otherwise null.

Remarks

To ensure that a peer is created, use CreatePeerForElement(Control).

GetAcceleratorKeyCore()

protected override string? GetAcceleratorKeyCore()

Returns

string

GetAccessKeyCore()

protected override string? GetAccessKeyCore()

Returns

string

GetAutomationControlTypeCore()

protected override AutomationControlType GetAutomationControlTypeCore()

Returns

AutomationControlType

GetAutomationIdCore()

protected override string? GetAutomationIdCore()

Returns

string

GetBoundingRectangleCore()

protected override Rect GetBoundingRectangleCore()

Returns

Rect

GetChildrenCore()

protected virtual IReadOnlyList<AutomationPeer>? GetChildrenCore()

Returns

IReadOnlyList<AutomationPeer>

GetClassNameCore()

protected override string GetClassNameCore()

Returns

string

GetControlTypeOverrideCore()

protected override AutomationControlType GetControlTypeOverrideCore()

Returns

AutomationControlType

GetHelpTextCore()

protected override string? GetHelpTextCore()

Returns

string

GetLabeledByCore()

protected override AutomationPeer? GetLabeledByCore()

Returns

AutomationPeer

GetNameCore()

protected override string? GetNameCore()

Returns

string

GetOrCreate(Control)

public AutomationPeer GetOrCreate(Control element)

Parameters

element Control

Returns

AutomationPeer

GetOrCreateChildrenCore()

protected override IReadOnlyList<AutomationPeer> GetOrCreateChildrenCore()

Returns

IReadOnlyList<AutomationPeer>

GetParentCore()

protected override AutomationPeer? GetParentCore()

Returns

AutomationPeer

GetVisualRootCore()

protected override AutomationPeer? GetVisualRootCore()

Returns

AutomationPeer

HasKeyboardFocusCore()

protected override bool HasKeyboardFocusCore()

Returns

bool

InvalidateChildren()

Invalidates the peer's children and causes a re-read from GetChildrenCore().

protected void InvalidateChildren()

InvalidateParent()

Invalidates the peer's parent.

protected void InvalidateParent()

IsContentElementCore()

protected override bool IsContentElementCore()

Returns

bool

IsContentElementOverrideCore()

protected override bool IsContentElementOverrideCore()

Returns

bool

IsControlElementCore()

protected override bool IsControlElementCore()

Returns

bool

IsControlElementOverrideCore()

protected override bool IsControlElementOverrideCore()

Returns

bool

IsEnabledCore()

protected override bool IsEnabledCore()

Returns

bool

IsKeyboardFocusableCore()

protected override bool IsKeyboardFocusableCore()

Returns

bool

IsOffscreenCore()

protected override bool IsOffscreenCore()

Returns

bool

SetFocusCore()

protected override void SetFocusCore()

ShowContextMenuCore()

protected override bool ShowContextMenuCore()

Returns

bool

TrySetParent(AutomationPeer?)

protected override bool TrySetParent(AutomationPeer? parent)

Parameters

parent AutomationPeer

Returns

bool