Compartilhar via


Suporte à Automação UI para o Tipo de Controle SplitButton

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 SplitButton 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. As condições incluem as diretrizes específicas para UI Automation estrutura de árvore, UI Automation os valores de propriedade e padrões de controle.

The split button control enables the ability to perform an action on a control and expand the control to see a list of other possible actions that can be performed.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the SplitButton control type. O UI Automation requisitos se aplicam a todos os dividir os controles de botão, se Windows Presentation Foundation (WPF), Win32, ou Windows Forms.

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

  • Required UI Automation Tree Structure
  • Required UI Automation Properties
  • Required UI Automation Control Patterns
  • Required UI Automation Events
  • SplitButton Control Example
  • 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 split button controls and describes what can be contained in each view. For more information about the UI Automation tree, see Visão geral da árvore de automação de interface do usuário.

Control View

Content View

SplitButton

  • Image (0 or 1)

  • Text (0 or 1)

  • Button (1 or 2)

    • Menu (0 ou 1; aparece como um filho do botão que suporta o padrão de ExpandCollapse)

    • MenuItem (1 to many)

SplitButton

  • MenuItem (1 to many)

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to split button controls. Para obter mais informações sobre UI Automation Propriedades, consulte 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.

Supported if there is a bounding rectangle. If not every point within the bounding rectangle is clickable, and you perform specialized hit testing, then override and provide a clickable point.

IsKeyboardFocusableProperty

See notes.

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

NameProperty

"Back"

The split button control's name is displayed on the button.

LabeledByProperty

Null

Split button controls do not have a static text label.

ControlTypeProperty

SplitButton

This value is the same for all UI frameworks.

LocalizedControlTypeProperty

"split button"

Localized string corresponding to the SplitButton control type.

HelpTextProperty

See notes.

O texto de Ajuda pode indicar o resultado de ativação no botão de divisão, que geralmente é o mesmo tipo de informação apresentada por meio de uma dica de ferramenta.

IsContentElementProperty

True

The split button control contains information for the end user.

IsControlElementProperty

True

The split button control is visible to the end user.

Required UI Automation Control Patterns

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

Padrão de controle

Support

Notes

IInvokeProvider

Required

Split buttons always have a default action associated with Invoke.

IExpandCollapseProvider

Required

Split buttons always have the ability to expand a list of options.

Required UI Automation Events

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

InvokedEvent

Required

None

BoundingRectangleProperty property-changed event.

Required

None

IsOffscreenProperty property-changed event.

Required

None

IsEnabledProperty property-changed event.

Required

None

ExpandCollapseStateProperty property-changed event.

Required

None

AutomationFocusChangedEvent

Required

None

StructureChangedEvent

Required

None

SplitButton Control Example

A imagem a seguir ilustra um tipo de controle SplitButton em um controle de grade de dados.

Botão de divisão

O controle e a exibição de conteúdo da árvore de automação da interface do usuário que pertence a controles de botão de divisão e grade de dados é exibido abaixo. The control patterns for each automation element are shown in parentheses.

UI Automation Tree - Control View

UI Automation Tree - Content View

  • SplitButton "Nome" (Chamar, ExpandCollapse)

  • Botão "Mais opções" (Chamar)

    • Menu

    • MenuItem

  • SplitButton "Nome" (Chamar, ExpandCollapse)

  • Botão "Mais opções" (Chamar)

    • Menu

    • MenuItem

Consulte também

Referência

SplitButton

Conceitos

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

UI Automation Overview