Share via


UI Automation Support for the StatusBar Control Type

This topic provides information about Microsoft UI Automation support for the StatusBar control type.

A status bar control displays information about an object being viewed in a window of an application, the object's component, or contextual information that relates to that object's operation within your application.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the StatusBar control type. The UI Automation requirements apply to all status bar controls, whether Microsoft Windows Presentation Foundation (WPF), Microsoft Win32, or Windows Forms.

This topic contains the following sections.

  • Required UI Automation Tree Structure
  • Required UI Automation Properties
  • Required UI Automation Control Patterns
  • Required UI Automation Events
  • Remarks
  • Related Topics

Required UI Automation Tree Structure

The following table depicts the control view and the content view of the UI Automation tree that pertains to status bar controls and describes what can be contained in each view. For more information about the UI Automation tree, see UI Automation Tree Overview.

Control View Content View
  • StatusBar
    • Edit (0 or more)
    • ProgressBar (0 or many)
    • Image (0 or many)
    • Button (0 or many)
  • StatusBar
    • Edit (0 or more)
    • ProgressBar (0 or many)
    • Image (0 or many)
    • Button (0 or many)

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to the status bar controls. For more information about UI Automation properties, see UI Automation Properties for Clients.

UI Automation Property Value Notes
UIA_AcceleratorKeyPropertyId NULL Status bars do not have accelerator keys.
UIA_AccessKeyPropertyId "" Status bars do not receive keyboard focus. Assistive technologies are able to programmatically read the contents.
UIA_AutomationIdPropertyId See notes. The value of this property must be unique across all controls in an application.
UIA_BoundingRectanglePropertyId See notes. The bounding rectangle of a status bar must encompass all of the controls contained within it.
UIA_ClickablePointPropertyId 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, override and provide a clickable point.
UIA_ControlTypePropertyId StatusBar This value is the same for all UI frameworks.
UIA_HelpTextPropertyId "" Status bars do not have help text.
UIA_IsContentElementPropertyId TRUE The status bar control is always included in the content view of the UI Automation tree.
UIA_IsControlElementPropertyId TRUE The status bar control is always included in the control view of the UI Automation tree.
UIA_IsKeyboardFocusablePropertyId Depends If the control can receive keyboard focus, it must support this property.
UIA_IsOffscreenPropertyId Depends If a status bar control is not currently visible, it will return TRUE for this property.
UIA_LabeledByPropertyId NULL The status bar control typically does not have a label.
UIA_LocalizedControlTypePropertyId See notes. Localized string corresponding to the StatusBar control type. The default value is "status bar" for en-US or English (United States).
UIA_NamePropertyId See notes. The status bar control does not need a name unless more than one is used within an application. In this case, distinguish each bar with names such as "Internet Status" or "Application Status."
UIA_OrientationPropertyId Depends A value indicating the control's orientation: horizontal or vertical.

Required UI Automation Control Patterns

The following table lists the UI Automation control patterns required to be supported for status bar controls. For more information on control patterns, see UI Automation Control Patterns Overview.

Control Pattern/Pattern Property Support/Value Notes
IGridProvider Optional Status bar controls should support the Grid control pattern so that individual pieces can be monitored and easily referenced for information.

Required UI Automation Events

The following table lists the UI Automation events that status bar controls are required to support. For more information on events, see UI Automation Events Overview.

UI Automation Event Notes
UIA_AutomationFocusChangedEventId None
UIA_BoundingRectanglePropertyId property-changed event. None
UIA_IsEnabledPropertyId property-changed event. If the control supports the IsEnabled property, it must support this event.
UIA_IsOffscreenPropertyId property-changed event. If the control supports the IsOffscreen property, it must support this event.
UIA_StructureChangedEventId None

Remarks

We recommend that edit controls be used as child grid elements in a status bar. Using edit controls makes it easier to associate the purpose of the status field with its value by using the element name and value property. Because text controls should not support the Value control pattern, they should not be used as child grid elements.