Implements WPF UI Automation for accessibility using AutomationPeer and AutomationProperties. Use when building accessible applications or enabling screen reader support.
View on GitHubchristian289/dotnet-with-claudecode
wpf-dev-pack
January 23, 2026
Select agents to install to:
npx add-skill https://github.com/christian289/dotnet-with-claudecode/blob/main/wpf-dev-pack/skills/implementing-wpf-automation/SKILL.md -a claude-code --skill implementing-wpf-automationInstallation paths:
.claude/skills/implementing-wpf-automation/# WPF UI Automation Patterns
Implementing accessibility features using UI Automation framework.
## 1. UI Automation Overview
```
UI Automation Framework
├── Providers (Server-side)
│ ├── AutomationPeer (base class)
│ ├── FrameworkElementAutomationPeer
│ └── Custom AutomationPeers
├── Clients (Consumer-side)
│ ├── Screen readers (Narrator, JAWS)
│ ├── Testing tools
│ └── Custom automation clients
└── Automation Properties
├── AutomationProperties.Name
├── AutomationProperties.HelpText
└── AutomationProperties.LabeledBy
```
---
## 2. AutomationProperties
### 2.1 Basic Properties
```xml
<!-- Name - primary identifier for screen readers -->
<Button Content="Submit"
AutomationProperties.Name="Submit form"/>
<!-- Name for image buttons (no text content) -->
<Button AutomationProperties.Name="Close window">
<Image Source="/Icons/close.png"/>
</Button>
<!-- HelpText - additional description -->
<TextBox AutomationProperties.Name="Email address"
AutomationProperties.HelpText="Enter your email in format user@domain.com"/>
<!-- LabeledBy - reference to label element -->
<Label x:Name="UsernameLabel" Content="Username:"/>
<TextBox AutomationProperties.LabeledBy="{Binding ElementName=UsernameLabel}"/>
```
### 2.2 Additional Properties
```xml
<!-- AcceleratorKey - keyboard shortcut hint -->
<Button Content="_Save"
AutomationProperties.AcceleratorKey="Ctrl+S"/>
<!-- AccessKey - mnemonic key -->
<Button Content="_File"
AutomationProperties.AccessKey="Alt+F"/>
<!-- ItemStatus - current state information -->
<ListBoxItem AutomationProperties.ItemStatus="Selected, 3 of 10"/>
<!-- ItemType - type description for list items -->
<ListBoxItem AutomationProperties.ItemType="Email message"/>
<!-- LiveSetting - for dynamic content updates -->
<TextBlock AutomationProperties.LiveSetting="Polite"
Text="{Binding StatusMessage}"/>
```
### 2.3 LiveSetting Values
| Value | Description |
|-------|-------------