Share via


UI Automation Control Types Overview

Microsoft UI Automation control types are properties that serve as well-known identifiers that indicate the kind of control that a particular user interface (UI) element represents, such as a combo box or a button. Client applications use the type to identify the capabilities of a control and to determine how to interact with it.

This topic contains the following sections:

  • UI Automation Control Type Requisites
  • The LocalizedControlType Property
  • Current UI Automation Control Types
  • Related Topics

UI Automation Control Type Requisites

Each UI Automation control type has a set of conditions associated with it. When a provider assigns a control type to a control, the provider must ensure that the control meets all of the conditions associated with that control type. The conditions include the following:

  • UI Automation control patterns: Each control type has a set of control patterns that the control must support, a set that is optional, and a set that the control must not support.
  • UI Automation property values: Each control type has a set of properties that the control must support.
  • UI Automation events: Each control type has a set of events that the control must support.
  • UI Automation tree structure: Each control type defines how the control must appear in the UI Automation tree structure.

When a control meets the conditions for a particular control type, the IUIAutomationElement::CurrentControlType (or IUIAutomationElement::CachedControlType) property value will indicate that control type.

If your control does not meet the specifications for a particular control type, use UIA_CustomControlTypeId as the control type ID, and completely describe the control by using the relevant control patterns and properties. You can also set the UIA_LocalizedControlTypePropertyId property to a string that best describes the type of your control.

The LocalizedControlType Property

If you use a predefined control type to describe your control, use the default value for the UIA_LocalizedControlTypePropertyId property and allow UI Automation to provide a localized string for providers to expose properly. If you cannot use a predefined control type to describe your control, set the UIA_LocalizedControlTypePropertyId property to a localized string that accurately describes the type of your control. The string should be concise, yet accurate enough that an assistive technology such as a screen reader can use it in the UI to inform the user of the control's type.

Current UI Automation Control Types

The following topics describe the UI Automation control types. For each control type, the description includes the set of conditions that a control of the given type must support: