TextBlockAutomationPeer TextBlockAutomationPeer TextBlockAutomationPeer TextBlockAutomationPeer Class


Exposes TextBlock types to Microsoft UI Automation.

public : class TextBlockAutomationPeer : FrameworkElementAutomationPeer, ITextBlockAutomationPeerpublic class TextBlockAutomationPeer : FrameworkElementAutomationPeer, ITextBlockAutomationPeerPublic Class TextBlockAutomationPeer Inherits FrameworkElementAutomationPeer Implements ITextBlockAutomationPeer// This API is not available in Javascript.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties


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

Default peer implementation and overrides in TextBlockAutomationPeer

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

TextPattern support

TextBlockAutomationPeer 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 TextBlockAutomationPeer peer class that exposes the pattern implementation for extension. And you won't see ITextRangeProvider and the similar managed interfaces in the TextBlockAutomationPeer 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 TextBlockAutomationPeer:


TextBlockAutomationPeer(TextBlock) TextBlockAutomationPeer(TextBlock) TextBlockAutomationPeer(TextBlock) TextBlockAutomationPeer(TextBlock)

Initializes a new instance of the TextBlockAutomationPeer class.

public : TextBlockAutomationPeer(TextBlock owner)public TextBlockAutomationPeer(TextBlock owner)Public Sub New(owner As TextBlock)// This API is not available in Javascript.
TextBlock TextBlock TextBlock TextBlock

The TextBlock to create a peer for.

See Also