Suporte de Automação de Interface de Usuário para o Tipo de Controle da Caixa Combo
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 a ComboBox 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 valores de propriedade, os padrões de controle, e UI Automation eventos.
A combo box is a list box combined with a static control or an edit control that displays the currently selected item in the list box portion of the combo box. The list box portion of the control is displayed at all times or only appears when the user selects the drop-down arrow (which is a push button) next to the control. If the selection field is an edit control, the user can enter information that is not in the list; otherwise, the user can only select items in the list.
The following sections define the required UI Automation tree structure, properties, control patterns, and events for the ComboBox control type. The UI Automation requirements apply to all combo box 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
- Required UI Automation Control Patterns
- Required 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 combo box 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 |
---|---|
ComboBox
|
ComboBox
|
The edit control in the control view of the combo box is necessary only if the combo box can be edited to take any input, as is the case of the combo box in the Run dialog box.
Required UI Automation Properties
The following table lists the UI Automation properties whose value or definition is especially relevant to combo box controls. Para obter mais informações sobre UI Automation Propriedades, consulte UI Automation Properties for Clients.
UI Automation Property |
Value |
Notes |
---|---|---|
See notes. |
The value of this property needs to be unique across all controls in an application. |
|
See notes. |
The outermost rectangle that contains the whole control. |
|
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. |
|
ComboBox |
This value is the same for all UI frameworks. |
|
See notes. |
O texto de ajuda para controles de caixa de combinação deve explicar por que o usuário é solicitado a escolher uma opção na caixa de combinação. O texto é semelhante ao apresentado por meio de uma dica de ferramenta de informações. Por exemplo, "Selecione um item para definir a resolução do monitor de vídeo". |
|
True |
Combo box controls are always included in the content view of the UI Automation tree. |
|
True |
Combo box controls are always included in the control view of the UI Automation tree. |
|
True |
Combo box controls expose a set of items from a selection container. The combo box control can receive keyboard focus, although when a UI Automation client sets focus on a combo box, any items in the combo box subtree might receive the focus. |
|
See notes. |
Combo box controls typically have a static text label that this property references. |
|
"combo box" |
Localized string corresponding to the ComboBox control type. |
|
See notes. |
The combo box control typically gets its name from a static text control. |
Required UI Automation Control Patterns
The following table lists the UI Automation control patterns required to be supported by all combo box controls. For more information on 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 |
---|---|---|
Yes |
The combo box control must always contain the drop-down button in order to be a combo box. |
|
Yes |
Displays the current selection in the combo box. This support is delegated to the list box beneath the combo box. |
|
Depends |
If the combo box has the ability to take arbitrary text values, the Value pattern must be supported. This pattern provides the ability to programmatically set the string contents of the combo box. If the Value pattern is not supported, this indicates that the user must make a selection from the list items within the subtree of the combo box. |
|
Never |
The Scroll pattern is never supported on a combo box directly. It is supported if a list box contained within a combo box can scroll. It may only be supported when the list box is visible on the screen. |
Required Events
The following table lists the UI Automation events required to be supported by all combo box 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 |
---|---|---|
Required |
None |
|
BoundingRectangleProperty property-changed event. |
Required |
None |
IsOffscreenProperty property-changed event. |
Required |
None |
IsEnabledProperty property-changed event. |
Required |
None |
Required |
None |
|
ExpandCollapseStateProperty property-changed event. |
Required |
None |
ValueProperty property-changed event. |
Depends |
If the control supports the Value pattern, it must support this event. |
Consulte também
Referência
Conceitos
Visão Geral dos Tipos de Controle de Automação de Interface do Usuário