Compartilhar via


Suporte de automação de interface do usuário para o tipo de controle Spinner

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 o controle giratório 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 control patterns.

Spinner controls are used to select from a domain of items or a range of numbers.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Spinner control type. The UI Automation requirements apply to all spinner 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

A tabela a seguir ilustra o modo de exibição do controle e o a exibir conteúdo da UI Automation árvore que pertencem aos controles giratórios, quando eles oferecem suporte a padrões de controle de valor de intervalo, seleção e valor e descreve o que pode estar contido em cada exibição. For more information on the UI Automation tree, see Visão geral da árvore de automação de interface do usuário.

O intervalo de valor ou valor padrão de controle

Control View

Content View

Spinner

  • Edit (0 or 1)

  • Button (2)

Spinner

Selection control pattern

Control View

Content View

Spinner

  • Edit (0 or 1)

  • Button (2)

  • List Item (0 or more)

Spinner

  • ListItem (0 or more)

To ensure that the two buttons in the control view subtree can be distinguished by automated test tools, assign the SmallIncrement or SmallDecrement AutomationId as appropriate. Para algumas implementações, o controle de edição associado pode ser um ponto de controle de catavento.

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to spinner controls. 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.

ClickablePointProperty

See notes.

The spinner control's clickable point gives focus to the edit portion of the control.

IsKeyboardFocusableProperty

See notes.

If the control can receive keyboard focus, it must support this property.

NameProperty

See notes.

The spinner control typically gets its name from a static text label.

LabeledByProperty

See notes.

Spinner controls have a static text label.

ControlTypeProperty

Spinner

This value is the same for all UI frameworks.

LocalizedControlTypeProperty

"spinner"

Localized string corresponding to the Spinner control type.

IsContentElementProperty

True

The spinner control must always be content.

IsControlElementProperty

True

The Spinner control must always be a control.

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 spinner controls. Para obter mais informações sobre padrões de controle, consulte Visão Geral de Padrões de Controle de Automação de Interface de Usuário.

Control Pattern/Pattern Property

Support/Value

Notes

ISelectionProvider

Depends

Spinner controls that have a list of items to be selected must support this pattern.

CanSelectMultiple

False

Spinner controls are always single selection containers.

IRangeValueProvider

Depends

Controles giratórios que abrangem um intervalo numérico podem oferecer suporte a esse padrão.

IValueProvider

Depends

Controles giratórios que abrangem um conjunto separado de opções ou os números podem oferecer suporte a esse padrão.

Required UI Automation Events

The following table lists the UI Automation events required to be supported by all spinner 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

InvalidatedEvent

Depends

None

BoundingRectangleProperty property-changed event.

Required

None

IsOffscreenProperty property-changed event.

Required

None

IsEnabledProperty property-changed event.

Required

None

ValueProperty property-changed event.

Depends

None

ValueProperty property-changed event.

Depends

None

AutomationFocusChangedEvent

Required

None

StructureChangedEvent

Required

None

Consulte também

Referência

Spinner

Conceitos

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

UI Automation Overview