Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ControlType Class

Identifies the type of a user interface (UI) control.

Namespace:  System.Windows.Automation
Assembly:  UIAutomationTypes (in UIAutomationTypes.dll)
public class ControlType : AutomationIdentifier

The ControlType type exposes the following members.

  NameDescription
Public propertyIdGets the underlying numerical identifier. (Inherited from AutomationIdentifier.)
Public propertyLocalizedControlTypeGets a description of the control type.
Public propertyProgrammaticNameGets the registered programmatic name. (Inherited from AutomationIdentifier.)
Top
  NameDescription
Public methodCompareToCompares this AutomationIdentifier with another AutomationIdentifier. (Inherited from AutomationIdentifier.)
Public methodEqualsReturns a value indicating whether the supplied AutomationIdentifier is equivalent to this AutomationIdentifier. (Inherited from AutomationIdentifier.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for this UI Automation identifier. (Inherited from AutomationIdentifier.)
Public methodGetNeverSupportedPatternsRetrieves the pattern identifiers that are not supported by the control type.
Public methodGetRequiredPatternSetsRetrieves an array of sets of required patterns.
Public methodGetRequiredPropertiesRetrieves an array of the required property identifiers (IDs) for this control type.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberLookupByIdRetrieves a ControlType that encapsulates a specified numerical identifier.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public fieldStatic memberButtonIdentifies a button control.
Public fieldStatic memberCalendarIdentifies a calendar control, such as a date-picker.
Public fieldStatic memberCheckBoxIdentifies a check box control.
Public fieldStatic memberComboBoxIdentifies a combo box control.
Public fieldStatic memberCustomIdentifies a control that is not one of the defined control types.
Public fieldStatic memberDataGridIdentifies a data grid control.
Public fieldStatic memberDataItemIdentifies a data item control.
Public fieldStatic memberDocumentIdentifies a document control.
Public fieldStatic memberEditIdentifies an edit control, such as a text box.
Public fieldStatic memberGroupIdentifies a group control, which acts as a container for other controls.
Public fieldStatic memberHeaderIdentifies a header control, which is a container for the labels of rows and columns of information.
Public fieldStatic memberHeaderItemIdentifies a header item, which is the label for a row or column of information.
Public fieldStatic memberHyperlinkIdentifies a hyperlink control.
Public fieldStatic memberImageIdentifies an image control.
Public fieldStatic memberListIdentifies a list control, such as a list box.
Public fieldStatic memberListItemIdentifies a list item control, which is a child item of a list control.
Public fieldStatic memberMenuIdentifies a menu control, such as a top-level menu in an application window.
Public fieldStatic memberMenuBarIdentifies a menu bar control, which generally contains a set of top-level menus.
Public fieldStatic memberMenuItemIdentifies a menu item control.
Public fieldStatic memberPaneIdentifies a pane control.
Public fieldStatic memberProgressBarIdentifies a progress bar control, which visually indicates the progress of a lengthy operation.
Public fieldStatic memberRadioButtonIdentifies a radio button control, which is a selection mechanism allowing exactly one selected item in a group.
Public fieldStatic memberScrollBarIdentifies a scroll bar control, such as a scroll bar in an application window.
Public fieldStatic memberSeparatorIdentifies a separator, which creates a visual division in controls like menus and toolbars.
Public fieldStatic memberSliderIdentifies a slider control.
Public fieldStatic memberSpinnerIdentifies a spinner control.
Public fieldStatic memberSplitButtonIdentifies a split button, which is a button that performs a default action and can also expand to a list of other possible actions.
Public fieldStatic memberStatusBarIdentifies a status bar control.
Public fieldStatic memberTabIdentifies a tab control.
Public fieldStatic memberTabItemIdentifies a tab item control, which represents a page of a tab control.
Public fieldStatic memberTableIdentifies a table.
Public fieldStatic memberTextIdentifies an edit control, such as a text box or rich text box.
Public fieldStatic memberThumbIdentifies the control in a scrollbar that can be dragged to a different position.
Public fieldStatic memberTitleBarIdentifies the caption bar on a window.
Public fieldStatic memberToolBarIdentifies a toolbar, such as the control that contains a set of command buttons in an application window.
Public fieldStatic memberToolTipIdentifies a tooltip control, an informational window that appears as a result of moving the pointer over a control or sometimes when tabbing to a control using the keyboard.
Public fieldStatic memberTreeIdentifies a tree control.
Public fieldStatic memberTreeItemIdentifies a node in a TreeItem control.
Public fieldStatic memberWindowIdentifies a window frame, which contains child objects.
Top

ControlType inherits from AutomationIdentifier and is used to identify the type of a control represented by an AutomationElement. The control type is determined by the developer of the UI Automation provider.

This class contains static fields, which are themselves ControlType objects, to identify the standard types of controls. There is also a Custom type for controls that do not match one of the defined types.

The only case where a control's control type might change at run time is where the control supports MultipleViewPattern. An example is the Win32 list view, which can be a DataGrid or List, depending on the current view.

Control types do not have a one-to-one equivalence to control patterns. A control can be of only one type, but it may support multiple patterns or no patterns at all, depending on its specific functionality.

For detailed information on the various control types, see UI Automation Control Types.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.