Skip to main content

IExpandCollapseProvider Interface

Definition

Assembly:Avalonia.Controls
Package:Avalonia

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

Methods

NameDescription
CollapseHides all nodes, controls, or content that are descendants of the control.
ExpandDisplays all child nodes, controls, or content of the control.

Collapse Method

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

public void Collapse()

Remarks

  • WindowsIExpandCollapseProvider.Collapse
  • macOS Called by setting NSAccessibilityProtocol.setAccessibilityExpanded to false.

Expand Method

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

public void Expand()

Remarks

  • WindowsIExpandCollapseProvider.Expand
  • macOS Called by setting NSAccessibilityProtocol.setAccessibilityExpanded to true, by calling NSAccessibilityProtocol.accessibilityPerformPress, or by calling NSAccessibilityProtocol.accessibilityPerformShowMenu when Avalonia.Automation.Provider.IExpandCollapseProvider.ShowsMenu is true.

Properties

NameDescription
ExpandCollapseStateGets the state, expanded or collapsed, of the control.
ShowsMenuGets a value indicating whether expanding the element shows a menu of items to the user, such as drop-down list.

ExpandCollapseState Property

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

public Avalonia.Automation.ExpandCollapseState ExpandCollapseState { get; set; }

Remarks

  • WindowsIExpandCollapseProvider.ExpandCollapseState
  • macOSNSAccessibilityProtocol.isAccessibilityExpanded

ShowsMenu Property

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; set; }

Remarks

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