The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AutomationProperties.Name attached property

Gets or sets the UI Automation name of the element.

<object AutomationProperties.Name="nameString" />

XAML Values


The name of the element. This should be a human-readable name, assistive technologies often use this name string in their behavior.


When getting this property in code, use GetName. When setting this property in code, use SetName.

AutomationProperties.Name is the most likely automation property to be picked up by UI Automation clients. The default peer implementations for most UI controls include logic that attempts to walk into the automation tree to find text content, and to use that text content as a control-generated default for AutomationProperties.Name. For example, a default instance of a Button control uses a ButtonAutomationPeer peer. This peer implements a behavior that promotes any inner text found within the button content to be the Name property value for UI Automation. Therefore, before routinely setting AutomationProperties.Name on all UI elements, you might want to test the UI Automation structure at run time first. If you use the default peer behavior, you can often take advantage of other mechanisms that are already in place. For example, if a Binding is used to set the Content of a Button, the dynamic run-time behavior of the automation peer can use the evaluated binding that might be using localized strings and resource dictionaries, so that there is no need to separately localize the AutomationProperties.Name value. For more info, see Basic accessibility information.

Requirements (Windows 10 device family)

Device family

API contract




Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]





See also

Basic accessibility information