Export (0) Print
Expand All
Expand Minimize

UI Automation Support for the Spinner Control Type

This topic provides information about UI Automation support for the Spinner 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 and control patterns.

Spinner controls are used to select from a domain of items or a range of numbers.

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

This topic contains the following sections.

Required UI Automation Tree Structure

The following table depicts the control view and the content view of the UI Automation tree that pertain to spinner controls when they support the Range Value and Selection control patterns and describes what can be contained in each view. For more information on the UI Automation tree, see UI Automation Tree Overview.

Range Value control pattern

Control View Content View
  • Spinner

  • Edit (0 or 1)

  • Button (2)

  • Spinner

Selection control pattern

Control View Content View
  • Spinner

  • Edit (0 or 1)

  • Button (2)

  • List Item (2 or more)

  • Spinner

  • ListItem (2 or more)

To ensure that the two buttons in the control view subtree can be distinguished by automated test tools, assign the SmallIncrement or SmallDecrement AutomationId as appropriate.

Required UI Automation Properties

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

UI Automation Property Value Notes

AutomationIdProperty

See notes.

The value of this property needs to be unique across all controls in an application.

BoundingRectangleProperty

See notes.

The outermost rectangle that contains the whole control.

ClickablePointProperty

See notes.

The spinner control's clickable point gives focus to the edit portion of the control.

IsKeyboardFocusableProperty

See notes.

If the control can receive keyboard focus, it must support this property.

NameProperty

See notes.

The spinner control typically gets its name from a static text label.

LabeledByProperty

See notes.

Spinner controls have a static text label.

ControlTypeProperty

spinner

This value is the same for all UI frameworks.

LocalizedControlTypeProperty

"spinner"

Localized string corresponding to the Spinner control type.

IsContentElementProperty

True

The spinner control must always be content.

IsControlElementProperty

True

The Spinner control must always be a control.

Required UI Automation Control Patterns

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

Control Pattern/Pattern Property Support/Value Notes

ISelectionProvider

Depends

Spinner controls that have a list of items to be selected must support this pattern.

CanSelectMultiple

False

Spinner controls are always single selection containers.

IRangeValueProvider

Depends

Spinner controls that span a numeric range must support this pattern.

Required UI Automation Events

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

UI Automation Event Support Notes

InvalidatedEvent

Depends

None

BoundingRectangleProperty property-changed event.

Required

None

IsOffscreenProperty property-changed event.

Required

None

IsEnabledProperty property-changed event.

Required

None

ValueProperty property-changed event.

Depends

None

ValueProperty property-changed event.

Depends

None

AutomationFocusChangedEvent

Required

None

StructureChangedEvent

Required

None

See Also

Community Additions

ADD
Show:
© 2014 Microsoft