IExpandCollapseProvider Interface
Definition
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
| Name | Description |
|---|---|
| Collapse | Hides all nodes, controls, or content that are descendants of the control. |
| Expand | Displays 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
- Windows
IExpandCollapseProvider.Collapse - macOS Called by setting
NSAccessibilityProtocol.setAccessibilityExpandedto false.
Expand Method
Displays all child nodes, controls, or content of the control.
public void Expand()
Remarks
- Windows
IExpandCollapseProvider.Expand - macOS Called by setting
NSAccessibilityProtocol.setAccessibilityExpandedto true, by callingNSAccessibilityProtocol.accessibilityPerformPress, or by callingNSAccessibilityProtocol.accessibilityPerformShowMenuwhen Avalonia.Automation.Provider.IExpandCollapseProvider.ShowsMenu is true.
Properties
| Name | Description |
|---|---|
| ExpandCollapseState | Gets the state, expanded or collapsed, of the control. |
| ShowsMenu | Gets 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
- Windows
IExpandCollapseProvider.ExpandCollapseState - macOS
NSAccessibilityProtocol.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.
- WindowsNo mapping.
- macOS When true,
NSAccessibilityProtocol.accessibilityPerformShowMenuwill cause the Avalonia.Automation.Provider.IExpandCollapseProvider.Expand method to be triggered.