Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 6.48 KB

richtextblockoverflowautomationpeer.md

File metadata and controls

44 lines (30 loc) · 6.48 KB
-api-id -api-type
T:Windows.UI.Xaml.Automation.Peers.RichTextBlockOverflowAutomationPeer
winrt class

Windows.UI.Xaml.Automation.Peers.RichTextBlockOverflowAutomationPeer

-description

Exposes RichTextBlockOverflow types to Microsoft UI Automation.

-remarks

The Windows Runtime RichTextBlockOverflow class creates a new RichTextBlockOverflowAutomationPeer as its OnCreateAutomationPeer definition. RichTextBlockOverflow is sealed, so the normal scenario of deriving from the RichTextBlockOverflow class and its existing peer isn't applicable to RichTextBlockOverflowAutomationPeer.

Default peer implementation and overrides in RichTextBlockOverflowAutomationPeer

RichTextBlockOverflowAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.

TextPattern support

RichTextBlockOverflowAutomationPeer supports the TextPattern Microsoft UI Automation pattern. The support for this pattern is implemented as native code by the peer, so you won't see public API for the RichTextBlockOverflowAutomationPeer peer class that exposes the pattern implementation for extension. And you won't see ITextRangeProvider and the similar managed interfaces in the RichTextBlockOverflowAutomationPeer inheritance. But Microsoft UI Automation clients can use the TextPattern pattern implemented by this peer and call its native API surface.

Here are some specifics of the TextPattern implementation in RichTextBlockOverflowAutomationPeer:

  • Move, MoveEndpointByUnit and ExpandToEnclosingUnit are supported for all TextUnit units including the Format value.
  • GetAttributeValue returns results within ranges for these text attributes: UIA_FontNameAttributeId, UIA_FontSizeAttributeId, UIA_FontWeightAttributeId, UIA_ForegroundColorAttributeId, UIA_CultureAttributeId, UIA_IsHiddenAttributeId, UIA_IsItalicAttributeId, UIA_IsReadOnlyAttributeId, UIA_CapStyleAttributeId, UIA_HorizontalTextAlignmentAttributeId, UIA_IndentationFirstLineAttributeId, UIA_IndentationLeadingAttributeId, UIA_IsSuperscriptAttributeId, UIA_IsSubscriptAttributeId, UIA_MarginBottomAttributeId, UIA_MarginLeadingAttributeId, UIA_MarginTopAttributeId, UIA_MarginTrailingAttributeId.
  • For the Move, MoveEndpointByUnit and ExpandToEnclosingUnit API when using the Format value, a format change is defined as a change within a range in any of the supported text attributes listed above.
  • ScrollIntoView is exposed in the pattern, but can only result in a behavior if the owner control is contained within a ScrollViewer. Otherwise a RichTextBlockOverflow doesn't have its own scrolling behavior. If the RichTextBlockOverflow does have a ScrollViewer parent, then the ScrollIntoView call fires a system event that requests the parent ScrollViewer to scroll. The alignToTop value is ignored.

-examples

-see-also

FrameworkElementAutomationPeer, RichTextBlockOverflow, RichTextBlock, Custom automation peers