Table of Contents

Class ComboBoxAutomationPeer

Namespace
Avalonia.Automation.Peers
Assembly
Avalonia.Controls.dll
public class ComboBoxAutomationPeer : SelectingItemsControlAutomationPeer, IScrollProvider, ISelectionProvider, IExpandCollapseProvider, IValueProvider
Inheritance
ComboBoxAutomationPeer
Implements
Inherited Members

Constructors

ComboBoxAutomationPeer(ComboBox)

public ComboBoxAutomationPeer(ComboBox owner)

Parameters

owner ComboBox

Properties

ExpandCollapseState

Gets the state, expanded or collapsed, of the control.

public ExpandCollapseState ExpandCollapseState { get; }

Property Value

ExpandCollapseState

Remarks

Windows IExpandCollapseProvider.ExpandCollapseState
macOS NSAccessibilityProtocol.isAccessibilityExpanded

Owner

public ComboBox Owner { get; }

Property Value

ComboBox

ShowsMenu

Gets a value indicating whether expanding the element shows a menu of items to the user, such as drop-down list.

public bool ShowsMenu { get; }

Property Value

bool

Remarks

Used in OSX to allow accessibilityPerformShowMenu to open expandable controls such as a ComboBox; in macOS, a combo box drop-down is considered a menu.

WindowsNo mapping.
macOS When true, NSAccessibilityProtocol.accessibilityPerformShowMenu will cause the Expand() method to be triggered.

Methods

Collapse()

Hides all nodes, controls, or content that are descendants of the control.

public void Collapse()

Remarks

Windows IExpandCollapseProvider.Collapse
macOS Called by setting NSAccessibilityProtocol.setAccessibilityExpanded to false.

Expand()

Displays all child nodes, controls, or content of the control.

public void Expand()

Remarks

Windows IExpandCollapseProvider.Expand
macOS Called by setting NSAccessibilityProtocol.setAccessibilityExpanded to true, by calling NSAccessibilityProtocol.accessibilityPerformPress, or by calling NSAccessibilityProtocol.accessibilityPerformShowMenu when ShowsMenu is true.

GetAutomationControlTypeCore()

protected override AutomationControlType GetAutomationControlTypeCore()

Returns

AutomationControlType

GetSelectionCore()

protected override IReadOnlyList<AutomationPeer>? GetSelectionCore()

Returns

IReadOnlyList<AutomationPeer>

OwnerPropertyChanged(object?, AvaloniaPropertyChangedEventArgs)

protected override void OwnerPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)

Parameters

sender object
e AvaloniaPropertyChangedEventArgs