Table of Contents

Interface IExpandCollapseProvider

Namespace
Avalonia.Automation.Provider
Assembly
Avalonia.Controls.dll

Exposes methods and properties to support UI Automation client access to controls that visually expand to display content and collapse to hide content.

public interface IExpandCollapseProvider

Properties

ExpandCollapseState

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

ExpandCollapseState ExpandCollapseState { get; }

Property Value

ExpandCollapseState

Remarks

Windows IExpandCollapseProvider.ExpandCollapseState
macOS NSAccessibilityProtocol.isAccessibilityExpanded

ShowsMenu

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

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.

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.

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.