AutomationProperties.AutomationId attached property

Applies to Windows and Windows Phone

Gets or sets the string that uniquely identifies the element to UI Automation.


<object AutomationProperties.AutomationId="idString" />

XAML Values

idString

The string that uniquely identifies the element to UI Automation.

Remarks

AutomationProperties.AutomationId is an attached property, which supports a XAML usage. When getting this property in code, use GetAutomationId. When setting this property in code, use SetAutomationId instead. In code usages, the target parameter is the object where the attached property value is set. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing AutomationIdProperty as the dependency property identifier.

If AutomationProperties.AutomationId is not specifically set, it returns the AutomationProperties.Name property value.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Automation

Metadata

Windows.winmd

See also

AutomationProperties

 

 

Show:
© 2014 Microsoft