Compartilhar via


UI Automation Support for the Tab Control Type

Observação

Esta documentação destina.Os desenvolvedores do NET Framework que desejam usar o gerenciado UI Automation classes definidas na System.Windows.Automation namespace.As informações mais recentes sobre UI Automation, consulte API de automação do Windows: Automação da interface do usuário.

Este tópico fornece informações sobre UI Automation suporte para a guia o tipo de controle. 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.

Este tópico contém as seguintes seções.

  • Required UI Automation Tree Structure
  • Required UI Automation Properties
  • Padrões de controle de automação de interface do usuário e as propriedades necessárias
  • Required UI Automation Events
  • Tópicos relacionados

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 Visão geral da árvore de automação de interface do usuário.

Control View

Content View

Tab

  • TabItem (1 or more)

  • ScrollBar (0 or 1)

    • Button (0 or 2)

Tab

  • TabItem (1 or more)

Tab controls have child UI Automation elements based on the Tab Item control type. Quando os itens de guia são agrupados (por exemplo, como em aplicativos de Microsoft Office de 2007) o tipo de controle de guia também pode hospedar grupos de tipos de controle para os itens da guia agrupados, como mostra a seguinte estrutura de árvore.

Control View

Content View

Tab

  • TabItem (1 or more)

  • Group (0 or more)

    • TabItem (0 or more)

  • Barra de rolagem (0 ou mais)

    • Button (0 or 2)

Tab

  • TabItem (1 or more)

  • Group (0 or more)

    • TabItem (0 or more)

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.

Padrões de controle de automação de interface do usuário e as propriedades necessárias

The following table lists the UI Automation control patterns required to be supported by all tab controls. For more information on control patterns, see Visão Geral de Padrões de Controle de Automação de Interface de Usuário.

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 Visão geral sobre eventos de automação de interface do usuário.

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

Consulte também

Referência

Tab

Conceitos

Visão Geral dos Tipos de Controle de Automação de Interface do Usuário

UI Automation Overview