UI Automation Support for the Image Control Type
This topic provides information about Microsoft UI Automation support for the Image control type.
Image controls used as icons, informational graphics, and charts will support the Image control type. Controls used as background or watermark images will not support the Image control type.
The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Image control type. The UI Automation requirements apply to all image 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
- Related Topics
The following table depicts the control view and the content view of the UI Automation tree that pertains to image 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|
The following table lists the UI Automation properties whose value or definition is especially relevant to the image controls. For more information about UI Automation properties, see UI Automation Properties for Clients.
|UI Automation Property||Value||Notes|
|UIA_AutomationIdPropertyId||See notes.||The value of this property must be unique across all controls in an application.|
|UIA_BoundingRectanglePropertyId||See notes.||The outermost rectangle that contains the whole control.|
|UIA_ClickablePointPropertyId||See notes.||The image control's clickable point must be a point within the bounding rectangle of the image control.|
|UIA_ControlTypePropertyId||Image||This value is the same for all UI frameworks.|
|UIA_HelpTextPropertyId||See notes.||The HelpText property exposes a localized string which describes the actual visual appearance of the control (for example, a red square with a white X) or other tooltip information associated with the image.
This property must be supported when a long description is needed to convey more information about the image control. For example, a complicated chart or diagram. This property maps to the HTML LongDesc tag and the Scalable Vector Graphics (SVG) Desc tag. Developers working with image controls must support a property to allow the visual description to be set on the control. This property must be mapped to the UI Automation VisualDescription property.
|UIA_IsContentElementPropertyId||See notes.||The image control must be included in the content view of the UI Automation tree when it contains meaningful information not already exposed to the end user.|
|UIA_IsControlElementPropertyId||TRUE||The image control is always included in the control view of the UI Automation tree.|
|UIA_IsKeyboardFocusablePropertyId||See notes.||If the control can receive keyboard focus, it must support this property.|
|UIA_ItemStatusPropertyId||See notes.||If the image control represents state information about a particular item on the screen, the control should be contained within the item. When the image is contained within an item, the item must support the status property and raise appropriate notifications when the status changes.
If an image is a standalone control and is conveying status this property must be supported.
|UIA_LabeledByPropertyId||See notes.||If there is a static text label, this property must expose a reference to that control.|
|UIA_LocalizedControlTypePropertyId||See notes.||Localized string corresponding to the Image control type. The default value is "image" for en-US or English (United States).|
|UIA_NamePropertyId||See notes.||The Name property must be exposed for all image controls that contain information. Programmatic access to this information requires that a textual equivalent to the graphic be provided. If the image control is purely decorative, it must only show up in the control view of the UI Automation tree and is not required to have a name. UI frameworks must support an ALT or alternate text property on images that can be set from within their framework. This property will then map to the UI Automation Name property.|
The following table lists the UI Automation control patterns required to be supported for image controls. For more information on control patterns, see UI Automation Control Patterns Overview.
|Control Pattern/Pattern Property||Support/Value||Notes|
|IGridItemProvider||Depends||The image control supports the Grid Item pattern if the control is within a grid container.|
|IInvokeProvider||Never||If the image control contains a clickable image, the control should support a control type that supports the Invoke pattern, such as the Button control type.|
|ISelectionItemProvider||Never||Image controls should not support the Selection Item pattern.|
|ITableItemProvider||Depends||The image control supports the Table Item pattern if the control is within a container that has header controls.|
The following table lists the UI Automation events that image controls are required to support. For more information on events, see UI Automation Events Overview.
|UI Automation Event||Notes|
|UIA_BoundingRectanglePropertyId property-changed event.||None|
|UIA_Invoke_InvokedEventId||Image controls never support the Invoke control pattern.|
|UIA_IsEnabledPropertyId property-changed event.||If the control supports the IsEnabled property, it must support this event.|
|UIA_IsOffscreenPropertyId property-changed event.||UIA_IsOffscreenPropertyId|
|UIA_NamePropertyId property-changed event.||None|
|UIA_SelectionItem_ElementAddedToSelectionEventId||Image controls never support the SelectionItem control pattern.|
|UIA_SelectionItem_ElementRemovedFromSelectionEventId||Image controls never support the SelectionItem control pattern.|
|UIA_SelectionItem_ElementSelectedEventId||Image controls never support the SelectionItem control pattern.|