UI Automation Support for the Tab Control Type
Note
This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation namespace. For the latest information about UI Automation, see Windows Automation API: UI Automation.
This topic provides information about UI Automation support for the Tab control type. In UI Automation, a control type is a set of conditions that a control must meet in order to use the ControlTypeProperty property. The conditions include specific guidelines for UI Automation tree structure, UI Automation property values and UI Automation. control patterns.
A tab control is analogous to the dividers in a notebook or the labels in a file cabinet. By using a tab control, an application can define multiple pages for the same area of a window or dialog box.
The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Tab control type. The UI Automation requirements apply to all tab controls, whether Windows Presentation Foundation (WPF), Win32, or Windows Forms.
Required UI Automation Tree Structure
The following table depicts the control view and the content view of the UI Automation tree that pertains to tab controls and describes what can be contained in each view. For more information on the UI Automation tree, see UI Automation Tree Overview.
Control View | Content View |
---|---|
Tab
|
Tab - TabItem (1 or more) |
Tab controls have child UI Automation elements based on the Tab Item control type. When tab items are grouped (for example, as in Microsoft Office 2007 applications) the Tab control type can also host Groups control types for the grouped tab items, as the following tree structure shows.
Control View | Content View |
---|---|
Tab
|
Tab
|
Required UI Automation Properties
The following table lists the UI Automation properties whose value or definition is especially relevant to the Tab control type. For more information on UI Automation properties, see UI Automation Properties for Clients.
UI Automation Property | Value | Notes |
---|---|---|
AutomationIdProperty | See notes. | The value of this property needs to be unique across all controls in an application. |
BoundingRectangleProperty | See notes. | The outermost rectangle that contains the whole control. |
IsKeyboardFocusableProperty | See notes. | If the control can receive keyboard focus, it must support this property. |
NameProperty | See notes. | The tab control rarely requires a Name property. |
ClickablePointProperty | No | The tab control does not have a clickable point. |
LabeledByProperty | See notes. | Tab controls typically have a static text label that is exposed through this property. |
ControlTypeProperty | Tab | This value is the same for all UI frameworks. |
LocalizedControlTypeProperty | "tab" | Localized string corresponding to the Tab control type. |
IsKeyboardFocusableProperty | True | The Tab control type must be able to receive keyboard focus. Typically, a UI Automation client calls SetFocus on a tab control and one of its items will forward the keyboard focus to the tab control. It is possible for some tab containers to take focus without setting focus to one of its items. |
IsContentElementProperty | True | The tab control is always included in the content view of the UI Automation tree. |
IsControlElementProperty | True | The tab control is always included in the control view of the UI Automation tree. |
OrientationProperty | See notes. | The tab control must always indicate whether it is positioned horizontally or vertically. |
Required UI Automation Control Patterns and Properties
The following table lists the UI Automation control patterns required to be supported by all tab controls. For more information on control patterns, see UI Automation Control Patterns Overview.
Control Pattern/Pattern Property | Support/Value | Notes |
---|---|---|
ISelectionProvider | Yes | All tab controls must support the Selection pattern. |
IsSelectionRequired | True | Tab controls always require that a selection be made. |
CanSelectMultiple | False | Tab controls are always single-selection containers. |
IScrollProvider | Depends | The Scroll pattern must be supported in the tab control has widgets that allow for a set of tab items to be scrolled through. |
Required UI Automation Events
The following table lists the UI Automation events required to be supported by all tab controls. For more information on events, see UI Automation Events Overview.
UI Automation Event | Support | Notes |
---|---|---|
BoundingRectangleProperty property-changed event. | Required | None |
IsOffscreenProperty property-changed event. | Required | None |
IsEnabledProperty property-changed event. | Required | None |
HorizontallyScrollableProperty property-changed event. | Depends | None |
HorizontalScrollPercentProperty property-changed event. | Depends | None |
HorizontallyScrollableProperty property-changed event. | Depends | None |
HorizontalViewSizeProperty property-changed event. | Depends | None |
VerticalScrollPercentProperty property-changed event. | Depends | None |
VerticalViewSizeProperty property-changed event. | Depends | None |
AutomationFocusChangedEvent | Required | None |
StructureChangedEvent | Required | None |