UI Automation Support for the MenuBar Control Type
Actualización: noviembre 2007
This topic provides information about Automatización de la interfaz de usuario support for the MenuBar control type. In Automatización de la interfaz de usuario, 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 Automatización de la interfaz de usuario tree structure, Automatización de la interfaz de usuario property values and control patterns.
Menu bar controls are an example of controls that implement the MenuBar control type. Menu bars provide a means for users to activate commands and options contained in an application.
The following sections define the required Automatización de la interfaz de usuario tree structure, properties, control patterns, and events for the MenuBar control type. The Automatización de la interfaz de usuario requirements apply to all list controls, whether Windows Presentation Foundation (WPF), Win32, or formularios Windows Forms.
Este tema contiene las secciones siguientes.
- Required UI Automation Tree Structure
- Required UI Automation Properties
- Required UI Automation Control Patterns
- Required UI Automation Events
- Temas relacionados
Required UI Automation Tree Structure
The following table depicts the control view and the content view of the Automatización de la interfaz de usuario tree that pertains to menu bar controls and describes what can be contained in each view. For more information on the Automatización de la interfaz de usuario tree, see UI Automation Tree Overview.
Control View |
Content View |
---|---|
|
|
Menu bar controls can contain other controls such as edit controls and combo boxes within its structure. These additional controls correspond to the "other controls" listed above in the control and content views.
Required UI Automation Properties
The following table lists the Automatización de la interfaz de usuario properties whose value or definition is especially relevant to the menu bar controls. For more information on Automatización de la interfaz de usuario properties, see UI Automation Properties for Clients.
Automatización de la interfaz de usuario Property |
Value |
Notes |
---|---|---|
See notes. |
The value exposed by this property must include all of the controls contained within it. |
|
See notes. |
The menu bar control does not need a name unless an application has more than one menu bar. If there is more than one menu bar in an application, then this property should be used to expose distinguishing names, such as "Formatting" or "Outlining." |
|
Null |
Menu bar controls never have a label. |
|
MenuBar |
This value is the same for all UI frameworks. |
|
"menu bar" |
Localized string corresponding to the MenuBar control type. |
|
True |
The menu bar control is always included in the content view of the Automatización de la interfaz de usuario tree. |
|
True |
The menu bar control is always included in the control view of the Automatización de la interfaz de usuario tree. |
|
See notes. |
The value of this property depends on whether the control is viewable on the screen. |
|
Depends |
This property exposes whether the menu bar control is horizontal or vertical. |
|
True |
Menu bar controls are keyboard-focusable because the controls they contain can take keyboard focus. |
|
See notes. |
No scenarios for when Help text is required for a menu bar control. |
|
Null |
Menu bars never have accelerator keys. |
|
"ALT" |
Pressing the ALT key should always bring focus to the menu bar within the application. |
Required UI Automation Control Patterns
The following table lists the Automatización de la interfaz de usuario control patterns required to be supported by menu bar controls. For more information on control patterns, see Información general acerca de los patrones de control de automatización de la interfaz de usuario.
Control Pattern/Pattern Property |
Support/Value |
Notes |
---|---|---|
Depends |
If the control can be expanded or collapsed, implement IExpandCollapseProvider. |
|
Depends |
If the control can be docked to different parts of the screen, implement IDockProvider. |
|
Depends |
If the control can be resized, rotated or moved it must implement ITransformProvider. |
Required UI Automation Events
The following table lists the Automatización de la interfaz de usuario events required to be supported by all menu bar controls. For more information on events, see UI Automation Events Overview.
Automatización de la interfaz de usuario Event |
Support/Value |
Notes |
---|---|---|
BoundingRectangleProperty property-changed event. |
Required |
None |
IsOffscreenProperty property-changed event. |
Required |
None |
IsEnabledProperty property-changed event. |
Required |
None |
ExpandCollapseStateProperty property-changed event. |
Depends |
None |
Required |
None |
|
Required |
None |
Vea también
Conceptos
UI Automation Control Types Overview