Export (0) Print
Expand All

UI Automation Support for the Document Control Type

This topic provides information about Microsoft UI Automation support for the Document control type.

Document controls let a user view and manipulate multiple pages of text. Unlike edit controls which only support a simple line of unformatted text, document controls can host text that is richly styled and formatted

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Document control type. The UI Automation requirements apply to all document controls, whether Microsoft Windows Presentation Foundation (WPF), Microsoft 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 pertains to document 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
  • Document
    • Varies
  • Document
    • Varies

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to the document 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 needs to 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 document has a clickable point that will cause the document of one of its elements in the document container to have focus.
UIA_ControlTypePropertyId Tree This value is the same for all UI frameworks.
UIA_IsContentElementPropertyId TRUE The document control is always included in the content view of the UI Automation tree.
UIA_IsControlElementPropertyId TRUE The document 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_LabeledByPropertyId See notes. The value of this property should be the label of the document control. Typically, the title of the document is used.
UIA_LocalizedControlTypePropertyId See notes. Localized string corresponding to the Document control type. The default value is "document" for en-US or English (United States).
UIA_NamePropertyId See notes. The document control typically gets its name from the file name it is loaded from. This is often displayed in a containing window or frame title.

Required UI Automation Control Patterns

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

Control Pattern/Pattern Property Support/Value Notes
IScrollProvider Depends The document control can span larger than that span of the viewport. The control should support the Scroll control pattern if the content is scrollable.
ITextProvider Required All document controls must support this control pattern.
IValueProvider Depends While UI Automation clients can use IUIAutomationTextPattern to obtain text information about a document, they need the Value control pattern to set the inner value. Simple text entry is possible only through the Value control pattern.

Required UI Automation Events

The following table lists the UI Automation events that document controls are required to support. For more information on events, see UI Automation Events Overview.

UI Automation Event Notes
UIA_AutomationFocusChangedEventId None
UIA_BoundingRectanglePropertyId property-changed event. None
UIA_IsEnabledPropertyId property-changed event. If the control supports the IsEnabled property, it must support this event.
UIA_IsOffscreenPropertyId property-changed event. If the control supports the IsOffscreen property, it must support this event.
UIA_StructureChangedEventId None
UIA_ScrollHorizontallyScrollablePropertyId property-changed event. If the control supports the Scroll control pattern, it must support this event.
UIA_ScrollHorizontalScrollPercentId property-changed event. If the control supports the Scroll control pattern, it must support this event.
UIA_ScrollHorizontalViewSizePropertyId property-changed event. If the control supports the Scroll control pattern, it must support this event.
UIA_ScrollVerticallyScrollablePropertyId property-changed event. If the control supports the Scroll control pattern, it must support this event.
UIA_ScrollVerticalScrollPercentId property-changed event. If the control supports the Scroll control pattern, it must support this event.
UIA_ScrollVerticalViewSizePropertyId property-changed event. If the control supports the Scroll control pattern, it must support this event.
UIA_Selection_InvalidatedEventId If the control supports the Selection control pattern, it must support this event.
UIA_Text_TextSelectionChangedEventId None
UIA_Text_TextChangedEventId None
UIA_ValueValuePropertyId property-changed event. If the control supports the Value control pattern, it must support this event.

Related Topics

Community Additions

Show:
© 2014 Microsoft