UI Automation Support for the Window 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 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.

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 ViewContent View

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 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.The window control must have a clickable point that will result in causing the window to become selected or unselected.
ControlTypePropertyWindowThis value is the same for all UI frameworks.
IsContentElementPropertyTrueThe window control must always be content.
IsControlElementPropertyTrueThe window control must always be a control.
IsKeyboardFocusablePropertySee notes.If the control can receive keyboard focus, it must support this property.
LabeledByPropertynullWindow controls do not have a static Window label.
LocalizedControlTypeProperty"window"Localized string corresponding to the Window control type.
NamePropertySee 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.

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 PatternSupportNotes
IDockProviderConditionalMust be supported if the window has the ability to be docked.
ITransformProviderRequiredEnables the window to be moved, resized, or rotated on the screen.
IWindowProviderRequiredEnables specific operations for the window.

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 EventSupportNotes
BoundingRectangleProperty property-changed event.RequiredNone
IsEnabledProperty property-changed event.RequiredNone
IsOffscreenProperty property-changed event.RequiredNone
NameProperty property-changed event.RequiredNone
HorizontallyScrollableProperty property-changed event.DependsNone
HorizontalScrollPercentProperty property-changed event.DependsNone
HorizontalViewSizeProperty property-changed event.DependsNone
VerticalScrollPercentProperty property-changed event.DependsNone
VerticallyScrollableProperty property-changed event.DependsNone
VerticalViewSizeProperty property-changed event.DependsNone
WindowVisualStateProperty property-changed event.DependsNone

UI Automation Control Types Overview
UI Automation Overview