UI 自动化控件类型概述UI Automation Control Types Overview

备注

本文档适用于想要使用 UI 自动化UI Automation 命名空间中定义的托管 System.Windows.Automation 类的 .NET Framework 开发人员。This documentation is intended for .NET Framework developers who want to use the managed UI 自动化UI Automation classes defined in the System.Windows.Automation namespace. 有关 UI 自动化UI Automation的最新信息,请参阅 Windows 自动化 API:UI 自动化For the latest information about UI 自动化UI Automation, see Windows Automation API: UI Automation.

Microsoft UI 自动化Microsoft UI Automation 控件类型是已知的标识符,可用于指示特定元素显示的控件类型,例如组合框或按钮。control types are well-known identifiers that can be used to indicate what kind of control a particular element represents, such as a combo box or a button.

具有已知标识符便于辅助技术设备确定 用户界面 (UI)user interface (UI) 中可用的控件的类型以及和控件交互的方式。Having a well-known identifier makes it easier for assistive technology devices to determine what types of controls are available in the 用户界面 (UI)user interface (UI) and how to interact with the controls.

UI 自动化控件类型必备条件UI Automation Control Type Requisites

Microsoft UI 自动化Microsoft UI Automation 控件类型提供一组提供程序必须满足的条件。control types provide a set of conditions that providers must meet. 满足这些条件时,控件可以使用特定的控件类型名称。When these conditions are met, the control can use the specific control type name. 每个控件类型对以下内容设有条件:Each control type has conditions for the following:

  • UI 自动化UI Automation 控件模式 — 必须支持哪些控件模式、哪个控件模式是可选的以及控件不得支持哪些控件模式。control patterns—which control patterns must be supported, which control patterns are optional, and which control patterns must not be supported by the control.

  • UI 自动化UI Automation 属性值 — 支持哪些属性值。property values—which property values are supported.

  • UI 自动化UI Automation 树结构 — 控件必需的 UI 自动化UI Automation 树结构。tree structure—the required UI 自动化UI Automation tree structure for the control.

当控件满足特定控件类型的条件时, ControlType 属性值将指示该控件类型。When a control meets the conditions for a particular control type, the ControlType property value will indicate that control type.

当前的 UI 自动化控件类型Current UI Automation Control Types

以下列表包含当前 Microsoft UI 自动化Microsoft UI Automation 控制类型集:The following list contains the current set of Microsoft UI 自动化Microsoft UI Automation control types:

另请参阅See also