UI Automation Support for the Window Control Type

This topic provides information about UI Automation support for the Window 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.

The window control consists of the window frame, which contains child objects such as title bar, client, and other objects.

The UI Automation requirements in the following sections apply to all controls that implement the Window control type, whether Windows Presentation Foundation (WPF), 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
  • 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 window controls and describes what can be contained in each view. For more information on the UI Automation tree, see UI Automation Tree Overview.

Control View Content View
  • Window

  • Window

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to window controls. For more information about 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 window control must have a clickable point that will result in causing the window to become selected or unselected.

ControlTypeProperty

Window

This value is the same for all UI frameworks.

IsContentElementProperty

True

The window control must always be content.

IsControlElementProperty

True

The window control must always be a control.

IsKeyboardFocusableProperty

See notes.

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

LabeledByProperty

null

Window controls do not have a static Window label.

LocalizedControlTypeProperty

"item"

Localized string corresponding to the Window control type.

NameProperty

See notes.

The window control always contains a primary Window element that relates to what the user would associate as the most semantic identifier for the item.

Required UI Automation Control Patterns

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

Control Pattern/Pattern Property Support/Value Notes

IDockProvider

Conditional

Must be supported if the window has the ability to be docked.

ITransformProvider

Required

Enables the window to be moved, resized, or rotated on the screen.

IWindowProvider

Required

Enables specific operations for the window.

Required UI Automation Events

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


UI Automation Event Support Notes

AsyncContentLoadedEvent

Required

None

AutomationFocusChangedEvent

Required

None

BoundingRectangleProperty property-changed event.

Required

None

IsEnabledProperty property-changed event.

Required

None

IsOffscreenProperty property-changed event.

Required

None

LayoutInvalidatedEvent

Required

None

NameProperty property-changed event.

Required

None

StructureChangedEvent

Required

None

HorizontallyScrollableProperty property-changed event.

Depends

None

HorizontalScrollPercentProperty property-changed event.

Depends

None

HorizontalViewSizeProperty property-changed event.

Depends

None

VerticalScrollPercentProperty property-changed event.

Depends

None

VerticallyScrollableProperty property-changed event.

Depends

None

VerticalViewSizeProperty property-changed event.

Depends

None

WindowClosedEvent

Required

None

WindowOpenedEvent

Required

None

WindowVisualStateProperty property-changed event.

Depends

None

See Also

Reference

Window

Concepts

UI Automation Control Types Overview
UI Automation Overview