AutomationProperties Class
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Provides support for getting or setting the value of instance-level values of automation properties. These property values are set as attached properties (typically in XAML) and supplement or override automation property values from a control's AutomationPeer.
Inheritance Hierarchy
System.Object
System.Windows.Automation.AutomationProperties
Namespace: System.Windows.Automation
Assembly: System.Windows (in System.Windows.dll)
Syntax
'Declaration
Public NotInheritable Class AutomationProperties
public static class AutomationProperties
The AutomationProperties type exposes the following members.
Attached Properties
Name | Description | |
---|---|---|
AcceleratorKey | Gets or sets the accelerator key string for the element. | |
AccessKey | Gets or sets the access key for the element. | |
AutomationId | Gets or set the string that uniquely identifies the element to UI automation. | |
HelpText | Gets or sets the help text for the element. | |
IsRequiredForForm | Gets or sets a value that indicates whether the element is required to be filled out on a form. | |
ItemStatus | Gets or sets a description of the status of an item in an element. | |
ItemType | Gets or sets a description of the type of the specified element. | |
LabeledBy | Gets or sets the element that contains the text label for the element. | |
Name | Gets or sets the automation name of the element. |
Top
Methods
Name | Description | |
---|---|---|
GetAcceleratorKey | Gets the value of the AutomationProperties.AcceleratorKey attached property for the specified DependencyObject. | |
GetAccessKey | Gets the value of the AutomationProperties.AccessKey attached property for the specified DependencyObject. | |
GetAutomationId | Gets the value of the AutomationProperties.AutomationId attached property for the specified DependencyObject. | |
GetHelpText | Gets the value of the AutomationProperties.HelpText attached property for the specified DependencyObject. | |
GetIsRequiredForForm | Gets the value of the AutomationProperties.IsRequiredForForm attached property for the specified DependencyObject. | |
GetItemStatus | Gets the value of the AutomationProperties.ItemStatus attached property for the specified DependencyObject. | |
GetItemType | Gets the value of the AutomationProperties.ItemType attached property for the specified DependencyObject. | |
GetLabeledBy | Gets the value of the AutomationProperties.LabeledBy attached property for the specified DependencyObject. | |
GetName | Gets the value of the AutomationProperties.Name attached property for the specified DependencyObject. | |
SetAcceleratorKey | Sets the value of the AutomationProperties.AcceleratorKey attached property for the specified DependencyObject. | |
SetAccessKey | Sets the value of the AutomationProperties.AccessKey attached property for the specified DependencyObject. | |
SetAutomationId | Sets the value of the AutomationProperties.AutomationId attached property for the specified DependencyObject. | |
SetHelpText | Sets the value of the AutomationProperties.HelpText attached property for the specified DependencyObject. | |
SetIsRequiredForForm | Sets the value of the AutomationProperties.IsRequiredForForm attached property for the specified DependencyObject. | |
SetItemStatus | Sets the value of the AutomationProperties.ItemStatus attached property for the specified DependencyObject. | |
SetItemType | Sets the value of the AutomationProperties.ItemType attached property for the specified DependencyObject. | |
SetLabeledBy | Sets the value of the AutomationProperties.LabeledBy attached property for the specified DependencyObject. | |
SetName | Sets the value of the AutomationProperties.Name attached property for the specified DependencyObject. |
Top
Fields
Name | Description | |
---|---|---|
AcceleratorKeyProperty | Identifies the AutomationProperties.AcceleratorKey attached property. | |
AccessKeyProperty | Identifies the AutomationProperties.AccessKey attached property. | |
AutomationIdProperty | Identifies the AutomationProperties.AutomationId attached property. | |
HelpTextProperty | Identifies the AutomationProperties.HelpText attached property. | |
IsRequiredForFormProperty | Identifies the AutomationProperties.IsRequiredForForm attached property. | |
ItemStatusProperty | Identifies the AutomationProperties.ItemStatus attached property. | |
ItemTypeProperty | Identifies the AutomationProperties.ItemType attached property. | |
LabeledByProperty | Identifies the AutomationProperties.LabeledBy attached property. | |
NameProperty | Identifies the AutomationProperties.Name attached property. |
Top
Remarks
Scenarios and techniques for System.Windows.Automation.AutomationProperties are described in detail in the topic Automation Properties for Accessibility Support in UI.
This class defines several attached properties. In Silverlight, all attached properties are backed by dependency properties. Attached properties are a XAML concept, whereas dependency properties are a concept implemented by Silverlight and also WPF. Thus the attached property system in Silverlight includes concepts that are related to XAML as well as to the general Silverlight dependency property concepts. In code, you can get or set the attached properties either using a dedicated accessor, or by using GetValue and SetValue.
For example, to set a value for AutomationProperties.AutomationId in code, you could either call SetAutomationId (the dedicated accessor), or call SetValue and pass the AutomationIdProperty identifier. For more information on attached properties in Silverlight, see Attached Properties Overview.
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also