ExpandCollapsePattern 类

定义

表示以可视化方式展开显示内容,折叠隐藏内容的控件。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
继承
ExpandCollapsePattern

注解

聚合控件-用提供展开/折叠功能的 UI 的子对象生成-必须支持ExpandCollapsePattern控件模式, 而它们的子元素不支持控件模式。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. 例如,组合框控件是由列表框、按钮和编辑控件组合而成的,但它是唯一一个必须支持 ExpandCollapsePattern的父组合框。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. 菜单项支持ExpandCollapsePattern控件模式, 但父菜单控件不支持。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

标识 ExpandCollapseState 属性。Identifies the ExpandCollapseState property.

Pattern

标识 ExpandCollapsePattern 控件模式。Identifies the ExpandCollapsePattern control pattern.

属性

Cached

获取此 ExpandCollapsePattern 中已缓存的 UI 自动化UI Automation 属性值。Gets the cached UI 自动化UI Automation property values for this ExpandCollapsePattern.

Current

获取此 ExpandCollapsePattern 的当前 UI 自动化UI Automation 属性值。Gets the current UI 自动化UI Automation property values for this ExpandCollapsePattern.

方法

Collapse()

隐藏 AutomationElement 的所有子代节点、控件或内容。Hides all descendant nodes, controls, or content of the AutomationElement.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Expand()

显示 AutomationElement 的全部子节点、控件或内容。Displays all child nodes, controls, or content of the AutomationElement.

GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅