Export (0) Print
Expand All

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 where the UI framework/platform integrates UI Automation support for control types and control patterns.

This topic contains the following sections.

Typical Tree Structure

The following table depicts a typical control and 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 ViewContent View
  • Document
    • Varies
  • Document
    • Varies

 

Relevant Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to document controls. For more information about UI Automation properties, see Retrieving Properties from UI Automation Elements.

UI Automation PropertyValueNotes
UIA_AutomationIdPropertyIdSee notes.The value of this property must be unique among all peer elements in the raw view of the UI Automation tree.
UIA_BoundingRectanglePropertyIdSee notes.The outermost rectangle that contains the whole control.
UIA_ClickablePointPropertyIdSee 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_ControlTypePropertyIdDocument
UIA_IsContentElementPropertyIdTRUEThe document control is always included in the content view of the UI Automation tree.
UIA_IsControlElementPropertyIdTRUEThe document control is always included in the control view of the UI Automation tree.
UIA_IsKeyboardFocusablePropertyIdSee notes.If the control can receive keyboard focus, it must support this property.
UIA_LabeledByPropertyIdSee notes.The value of this property should be the label of the document control. Typically, the title of the document is used.
UIA_LocalizedControlTypePropertyIdSee notes.Localized string corresponding to the Document control type. The default value is "document" for en-US or English (United States).
UIA_NamePropertyIdSee 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 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 PropertySupport/ValueNotes
IScrollProvider DependsThe 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 RequiredAll document controls must support the Text control pattern.
IValueProvider DependsWhile 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 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 EventNotes
UIA_AutomationFocusChangedEventId
UIA_BoundingRectanglePropertyId property-changed event.
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
UIA_ScrollHorizontallyScrollablePropertyId property-changed event.If the control supports the Scroll control pattern, it must support this event.
UIA_ScrollHorizontalScrollPercentPropertyId 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_ScrollVerticalScrollPercentPropertyId 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_InvalidatedEventIdIf the control supports the Selection control pattern, it must support this event.
UIA_Text_TextSelectionChangedEventId
UIA_Text_TextChangedEventId
UIA_ValueValuePropertyId property-changed event.If the control supports the Value control pattern, it must support this event.

 

Related topics

Conceptual
UI Automation Control Types Overview
UI Automation Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft