ExpandCollapsePattern ExpandCollapsePattern ExpandCollapsePattern ExpandCollapsePattern Class


Represents controls that visually expand to display content and collapse to hide content.

public ref class ExpandCollapsePattern : System::Windows::Automation::BasePattern
public class ExpandCollapsePattern : System.Windows.Automation.BasePattern
type ExpandCollapsePattern = class
    inherit BasePattern
Public Class ExpandCollapsePattern
Inherits BasePattern


Aggregate controls - built with child objects that provide the UI for expand/collapse functionality - must support the ExpandCollapsePattern control pattern while their child elements do not. For example, a combo box control is built with a combination of list box, button, and edit controls, but it is only the parent combo box that must support the ExpandCollapsePattern.


A menu control, even though an aggregate of individual menu items, is an exception to this rule. The menu items support the ExpandCollapsePattern control pattern, but the parent menu control does not. A similar exception applies to the tree and tree item controls.


ExpandCollapseStateProperty ExpandCollapseStateProperty ExpandCollapseStateProperty ExpandCollapseStateProperty

Identifies the ExpandCollapseState property.

Pattern Pattern Pattern Pattern

Identifies the ExpandCollapsePattern control pattern.


Cached Cached Cached Cached

Gets the cached UI Automation property values for this ExpandCollapsePattern.

Current Current Current Current

Gets the current UI Automation property values for this ExpandCollapsePattern.


Collapse() Collapse() Collapse() Collapse()

Hides all descendant nodes, controls, or content of the AutomationElement.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Expand() Expand() Expand() Expand()

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

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also