Suporte de Automação de Interface de Usuário para o Tipo de Controle Menu
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 Microsoft UI Automation suporte para o Menu o tipo de controle. It describes the control's Microsoft UI Automation tree structure and provides the properties and control patterns for specific control scenarios.
A menu control allows hierarchal organization of elements associated with commands and event handlers. In a typical Microsoft Windows application, a menu bar contains several menu buttons (such as File, Edit, and Window), and each menu button displays a menu. A menu contains a collection of menu items (such as New, Open, and Close), which can be expanded to display additional menu items or to perform a specific action when clicked.
The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Menu control type. The UI Automation requirements apply to all list 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 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 menu 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 |
---|---|
Menu
|
Não aplicável (a menos que o controle menu é um menu de contexto é pai de um objeto que não é um item de menu)
|
Menu controls always appear in the control view and the content view of the UI Automation tree. Menu control types should appear under the control that their information is referring to. Clientes de automação da interface do usuário deve escutar MenuOpenedEvent garantir que eles obtiverem consistentemente informações transmitidas por controles de menu. Context menu controls are a special case. They appear as children of the Desktop.
Required UI Automation Properties
The following table lists the UI Automation properties whose value or definition is especially relevant to the Menu control type. For more information on UI Automation properties, see UI Automation Properties for Clients.
UI Automation Property |
Value |
Notes |
---|---|---|
Not Supported |
The menu control does not require a Name property to be set. |
|
Null |
Nenhum rótulo é previsto com um controle de menu típico. |
|
Menu |
This value is the same for all UI frameworks. |
|
False |
The menu control is not included in the content view of the UI Automation tree. |
|
True |
The menu control is always included in the control view of the UI Automation tree. |
Required UI Automation Control Patterns
There are no required control patterns for the Menu control type.
Required UI Automation Events
Menu controls must raise MenuOpenedEvent when they appear on the screen. The MenuOpenedEvent will include the text of the control. The MenuClosedEvent must be raised when a menu disappears from the screen.
The following table lists the UI Automation events required to be supported by all menu controls. For more information on events, see Visão geral sobre eventos de automação de interface do usuário.
UI Automation Event |
Support/Value |
Notes |
---|---|---|
Required |
None |
|
Required |
None |
|
BoundingRectangleProperty property-changed event. |
Required |
None |
IsOffscreenProperty property-changed event. |
Required |
None |
IsEnabledPropertyevento de propriedade alterada. |
Required |
None |
Required |
None |
|
Required |
None |
Consulte também
Referência
Conceitos
Visão Geral de Padrões de Controle de Automação de Interface de Usuário
Visão Geral dos Tipos de Controle de Automação de Interface do Usuário