TextBlockAutomationPeer
C# API / Fluence.Wpf.Automation
- Assembly:
Fluence.Wpf - Namespace:
Fluence.Wpf.Automation
public class TextBlockAutomationPeer : FrameworkElementAutomationPeer
Exposes TextBlock to UI Automation as a text element.
Remarks: TextBlock wraps a TextBlock inside a ContentControl template to support the Fluent typography ramp. Without this peer, WPF creates a generic peer that reports ControlType.Pane, placing a spurious container in the UIA tree and breaking AutomationProperties.LabeledBy relationships that expect ControlType.Text.
Only TextBlock instances with an explicit NameProperty are visible in the UIA control view. Instances without a name are excluded so decorative body-copy text is not announced; the name is never derived from Text automatically.
Parameter owner: The TextBlock control represented by this automation peer.
Base type: FrameworkElementAutomationPeer (including inherited WPF and .NET members)
Constructors
TextBlockAutomationPeer
public TextBlockAutomationPeer(TextBlock owner)
Exposes TextBlock to UI Automation as a text element.
Remarks: TextBlock wraps a TextBlock inside a ContentControl template to support the Fluent typography ramp. Without this peer, WPF creates a generic peer that reports ControlType.Pane, placing a spurious container in the UIA tree and breaking AutomationProperties.LabeledBy relationships that expect ControlType.Text.
Only TextBlock instances with an explicit NameProperty are visible in the UIA control view. Instances without a name are excluded so decorative body-copy text is not announced; the name is never derived from Text automatically.
Parameter owner: The TextBlock control represented by this automation peer.
Methods
GetAutomationControlTypeCore
protected override AutomationControlType GetAutomationControlTypeCore()
Documentation inherited from the FrameworkElementAutomationPeer API.
GetClassNameCore
protected override string GetClassNameCore()
Documentation inherited from the FrameworkElementAutomationPeer API.
IsControlElementCore
protected override bool IsControlElementCore()
Documentation inherited from the FrameworkElementAutomationPeer API.