UI Automation Support for the ProgressBar Control Type

 
System_CAPS_ICON_note.jpg Note

This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation namespace. For the latest information about UI Automation, see Windows Automation API: UI Automation.

This topic provides information about UI Automation support for the ProgressBar control type. In UI Automation, 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 UI Automation tree structure, UI Automation property values, control patterns, and UI Automation events.

Progress bar controls are an example of controls that implement the ProgressBar control type. Progress bar controls are used to indicate the progress of a lengthy operation. The control consists of a rectangle that is gradually filled with the system highlight color as an operation progresses.

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

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

Control ViewContent View
ProgressBarProgressBar

The progress bar controls do not have any children in the control or content view of the UI Automation tree.

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

UI Automation PropertyValueNotes
AutomationIdPropertySee notes.The value of this property needs to be unique across all controls in an application.
BoundingRectanglePropertySee notes.The outermost rectangle that contains the whole control.
ClickablePointPropertySee 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.
IsKeyboardFocusablePropertySee notes.If the control can receive keyboard focus, it must support this property.
NamePropertySee notes.The progress bar control typically gets its name from a static text label. If there is not a static text label the application developer must expose a value for the Name property.
LabeledByPropertySee notes.If there is a static text label then this property must expose a reference to that control.
ControlTypePropertyProgressBarThis value is the same for all UI frameworks.
LocalizedControlTypeProperty"progress bar"Localized string corresponding to the ProgressBar control type.
IsContentElementPropertyTrueThe progress bar control is always included in the content view of the UI Automation tree.
IsControlElementPropertyTrueThe progress bar control is always included in the control view of the UI Automation tree.

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

Control Pattern/Pattern PropertySupport/ValueNotes
IValueProviderDependsProgress bar controls that give a textual indication of progress must implement IValueProvider.
IsReadOnlyTrueThe value for this property is always True.
ValueSee notes.This property exposes textual progress of a progress bar control.
IRangeValueProviderDependsProgress bar controls that take a numeric range must implement IRangeValueProvider
Minimum0.0The value of this property is the smallest value that the control can be set to.
Maximum100.0The value of this property is the largest value that the control can be set to.
SmallChangeNaNThis property is not required because progress bar controls are read-only.
LargeChangeNaNThis property is not required because progress bar controls are read-only.

The following table lists the UI Automation events required to be supported by all progress bar controls. For more information on events, see UI Automation Events Overview.

UI Automation EventSupportNotes
BoundingRectangleProperty property-changed event.RequiredNone
IsOffscreenProperty property-changed event.RequiredNone
IsEnabledProperty property-changed event.RequiredNone
NameProperty property-changed event.RequiredNone
ValueProperty property-changed event.DependsNone
AutomationFocusChangedEventRequiredNone
StructureChangedEventRequiredNone

ProgressBar
UI Automation Control Types Overview
UI Automation Overview

Show: