AutomationProperties AutomationProperties AutomationProperties AutomationProperties Class

Definition

Provides support for getting or setting 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.

public : sealed class AutomationProperties : IAutomationProperties
struct winrt::Windows::UI::Xaml::Automation::AutomationProperties : IAutomationProperties
public sealed class AutomationProperties : IAutomationProperties
Public NotInheritable Class AutomationProperties Implements IAutomationProperties
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

AutomationProperties XAML attached properties

AutomationProperties is the host service class for several XAML attached properties. The purpose of these attached properties is to enable setting various per-instance values that are pertinent to how a UI element is reported to the Microsoft UI Automation accessibility framework. This is useful in cases where the class design of the UI element doesn't already forward other UI-related property values as part of its Microsoft UI Automation integration or peer implementation behavior, or where the value being forwarded is not the value you want to report to Microsoft UI Automation.

In order to support XAML processor access to the attached properties, and also to expose equivalent get and set operations to code, each XAML attached property has a pair of Get and Set accessor methods, which are also members of AutomationProperties. For example, the GetName and SetName methods support and provide the equivalent code-only support for reporting automation Name values to Microsoft UI Automation, instead of using Name to set it in XAML. Alternatively, you can use the dependency property system to get or set the value of the attached property, and this also reports the underlying value to Microsoft UI Automation. Call GetValue or SetValue, passing the arguments of the dependency property identifier to set, and a reference to the target object on which to get or set the value.

Name property

Of the various attached properties, probably the most important one is Name. This is because it is the Name property that is most frequently accessed and reported by assistive technology when users interact with an app in an accessibility scenario. The Name serves as the human-readable identifier for the UI element.

Various UI elements have peer forwarding that can provide a default Name value based on other element properties. For example, the peer forwarding for the Button class will forward the ToString evaluation of the Button content and use this string as the default Name. In order to override that default, or to otherwise provide a Name value for any UI element case where there is no Microsoft UI Automation Name available, set the Name attached property on that element in XAML. For more info on why a Microsoft UI Automation Name is important, see Basic accessibility information. For more info on how to test whether an element already has a peer-supplied Name that is useful, see Accessibility testing.

For localization reasons, you should avoid hard-coded string values for the Name in XAML. If you set x:Uid directive on the element, then you can use RESW resources to target the property and provide different values for localization. For attached properties, the resource identifier form requires full qualification of the attached property in XAML form, including its namespace and a using: prefix. For example, to target the AutomationProperties.Name attached property value on a resource that has x:Uid directive value of "sendButton", the name value of the data item in the RESW resources is sendButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name

Properties

AcceleratorKeyProperty AcceleratorKeyProperty AcceleratorKeyProperty AcceleratorKeyProperty

Identifies the AutomationProperties.AcceleratorKey attached property, which is a string containing the accelerator key (also called shortcut key) combinations for the automation element.

AccessibilityViewProperty AccessibilityViewProperty AccessibilityViewProperty AccessibilityViewProperty

Identifies the AutomationProperties.AccessibilityView attached property. Set this attached property on individual elements in order to change their element visibility to specific modes requested by a UI Automation client.

AccessKeyProperty AccessKeyProperty AccessKeyProperty AccessKeyProperty

Identifies the AutomationProperties.AccessKey attached property, which is a string containing the access key character for the automation element.

AnnotationsProperty AnnotationsProperty AnnotationsProperty AnnotationsProperty

Identifies a dependency property that's used for a list of annotation objects in a document, such as comment, header, footer, and so on.

AutomationIdProperty AutomationIdProperty AutomationIdProperty AutomationIdProperty

Identifies the AutomationProperties.AutomationId attached property, which is a string containing the UI Automation identifier (ID) for the automation element.

ControlledPeersProperty ControlledPeersProperty ControlledPeersProperty ControlledPeersProperty

Identifies a dependency property that's used for controlled peers, which is an array of automation elements that are manipulated by the automation element that supports this property.

CultureProperty CultureProperty CultureProperty CultureProperty

Gets the identifier for the culture attached property which contains a locale identifier for the automation element (for example, 0x0409 for "en-US" or English (United States)).

DescribedByProperty DescribedByProperty DescribedByProperty DescribedByProperty

Gets the identifier for the described by attached property, which is an array of elements that provide more information about the automation element.

FlowsFromProperty FlowsFromProperty FlowsFromProperty FlowsFromProperty

Gets the identifier for the FlowsFrom attached property, which is an array of automation elements that suggests the reading order before the current automation element.

FlowsToProperty FlowsToProperty FlowsToProperty FlowsToProperty

Gets the identifier for the FlowsTo attached property, which is an array of automation elements that suggests the reading order after the current automation element.

FullDescriptionProperty FullDescriptionProperty FullDescriptionProperty FullDescriptionProperty

Gets the identifier for the full description attached property, which exposes a localized string containing extended description text for an element.

HeadingLevelProperty HeadingLevelProperty HeadingLevelProperty HeadingLevelProperty

Gets the identifier for the HeadingLevel attached property, which indicates the heading level for a UI Automation element.

HelpTextProperty HelpTextProperty HelpTextProperty HelpTextProperty

Identifies the AutomationProperties.HelpText attached property, which is a help text string associated with the automation element.

IsDataValidForFormProperty IsDataValidForFormProperty IsDataValidForFormProperty IsDataValidForFormProperty

Identifies the Boolean dependency property that indicates if the data is valid for the form.

IsPeripheralProperty IsPeripheralProperty IsPeripheralProperty IsPeripheralProperty

Identifies the Boolean dependency property that indicates if the automation element represents peripheral UI.

IsRequiredForFormProperty IsRequiredForFormProperty IsRequiredForFormProperty IsRequiredForFormProperty

Identifies the AutomationProperties.IsRequiredForForm attached property, which is a Boolean value that indicates whether the automation element is required to be filled out on a form.

ItemStatusProperty ItemStatusProperty ItemStatusProperty ItemStatusProperty

Identifies the AutomationProperties.ItemStatus attached property, which is a text string describing the status of an item of the automation element.

ItemTypeProperty ItemTypeProperty ItemTypeProperty ItemTypeProperty

Identifies the AutomationProperties.ItemType attached property, which is a text string describing the type of the automation element.

LabeledByProperty LabeledByProperty LabeledByProperty LabeledByProperty

Identifies the AutomationProperties.LabeledBy attached property, which is an automation element that contains the text label for this element.

LandmarkTypeProperty LandmarkTypeProperty LandmarkTypeProperty LandmarkTypeProperty

Gets the identifier for the landmark type attached property, which is a Landmark Type Identifier associated with an element.

LevelProperty LevelProperty LevelProperty LevelProperty

Gets the identifier for the Level attached property, which is a 1-based integer associated with an automation element.

LiveSettingProperty LiveSettingProperty LiveSettingProperty LiveSettingProperty

Identifies the AutomationProperties.LiveSetting attached property, which is supported by an automation element that represents a live region.

LocalizedControlTypeProperty LocalizedControlTypeProperty LocalizedControlTypeProperty LocalizedControlTypeProperty

Identifies the localized control type dependency property, which is a text string describing the type of control that the automation element represents.

LocalizedLandmarkTypeProperty LocalizedLandmarkTypeProperty LocalizedLandmarkTypeProperty LocalizedLandmarkTypeProperty

Gets the identifier for the localized landmark type attached property, which is a localized text string describing the type of landmark that the automation element represents.

NameProperty NameProperty NameProperty NameProperty

Identifies the AutomationProperties.Name attached property, which is a string that holds the name of the automation element.

PositionInSetProperty PositionInSetProperty PositionInSetProperty PositionInSetProperty

Gets the identifier for the PositionInSet attached property, which is a 1-based integer associated with an automation element.

SizeOfSetProperty SizeOfSetProperty SizeOfSetProperty SizeOfSetProperty

Gets the identifier for the attached property.

Methods

GetAcceleratorKey(DependencyObject) GetAcceleratorKey(DependencyObject) GetAcceleratorKey(DependencyObject) GetAcceleratorKey(DependencyObject)

Gets the value of the AutomationProperties.AcceleratorKey attached property for the specified DependencyObject.

GetAccessibilityView(DependencyObject) GetAccessibilityView(DependencyObject) GetAccessibilityView(DependencyObject) GetAccessibilityView(DependencyObject)

Gets the value of the AutomationProperties.AccessibilityView attached property for the specified DependencyObject.

GetAccessKey(DependencyObject) GetAccessKey(DependencyObject) GetAccessKey(DependencyObject) GetAccessKey(DependencyObject)

Gets the value of the AutomationProperties.AccessKey attached property for the specified DependencyObject.

GetAnnotations(DependencyObject) GetAnnotations(DependencyObject) GetAnnotations(DependencyObject) GetAnnotations(DependencyObject)

Gets the value of the AutomationProperties.Annotations property for the specified DependencyObject.

GetAutomationId(DependencyObject) GetAutomationId(DependencyObject) GetAutomationId(DependencyObject) GetAutomationId(DependencyObject)

Gets the value of the AutomationProperties.AutomationId attached property for the specified DependencyObject.

GetControlledPeers(DependencyObject) GetControlledPeers(DependencyObject) GetControlledPeers(DependencyObject) GetControlledPeers(DependencyObject)

A static utility method that retrieves the list of controlled peers from a target owner.

GetCulture(DependencyObject) GetCulture(DependencyObject) GetCulture(DependencyObject) GetCulture(DependencyObject)

Gets the value of the CultureProperty attached property for the specified DependencyObject.

GetDescribedBy(DependencyObject) GetDescribedBy(DependencyObject) GetDescribedBy(DependencyObject) GetDescribedBy(DependencyObject)

Gets a collection of elements that provide more information about the specified automation element.

GetFlowsFrom(DependencyObject) GetFlowsFrom(DependencyObject) GetFlowsFrom(DependencyObject) GetFlowsFrom(DependencyObject)

Gets a list of automation elements that suggests the reading order before the specified automation element.

GetFlowsTo(DependencyObject) GetFlowsTo(DependencyObject) GetFlowsTo(DependencyObject) GetFlowsTo(DependencyObject)

Gets a list of automation elements that suggests the reading order after the specified automation element.

GetFullDescription(DependencyObject) GetFullDescription(DependencyObject) GetFullDescription(DependencyObject) GetFullDescription(DependencyObject)

Gets a localized string that describes the visual appearance or contents of the specified DependencyObject.

GetHeadingLevel(DependencyObject) GetHeadingLevel(DependencyObject) GetHeadingLevel(DependencyObject) GetHeadingLevel(DependencyObject)

Gets the value of the AutomationProperties.HeadingLevel property for the specified DependencyObject.

GetHelpText(DependencyObject) GetHelpText(DependencyObject) GetHelpText(DependencyObject) GetHelpText(DependencyObject)

Gets the value of the AutomationProperties.HelpText attached property for the specified DependencyObject.

GetIsDataValidForForm(DependencyObject) GetIsDataValidForForm(DependencyObject) GetIsDataValidForForm(DependencyObject) GetIsDataValidForForm(DependencyObject)

Gets a Boolean value that indicates whether the entered or selected value is valid for the form rule associated with the specified element.

GetIsPeripheral(DependencyObject) GetIsPeripheral(DependencyObject) GetIsPeripheral(DependencyObject) GetIsPeripheral(DependencyObject)

Gets a Boolean value that indicates whether the specified element represents peripheral UI.

GetIsRequiredForForm(DependencyObject) GetIsRequiredForForm(DependencyObject) GetIsRequiredForForm(DependencyObject) GetIsRequiredForForm(DependencyObject)

Gets the value of the AutomationProperties.IsRequiredForForm attached property for the specified DependencyObject.

GetItemStatus(DependencyObject) GetItemStatus(DependencyObject) GetItemStatus(DependencyObject) GetItemStatus(DependencyObject)

Gets the value of the AutomationProperties.ItemStatus attached property for the specified DependencyObject.

GetItemType(DependencyObject) GetItemType(DependencyObject) GetItemType(DependencyObject) GetItemType(DependencyObject)

Gets the value of the AutomationProperties.ItemType attached property for the specified DependencyObject.

GetLabeledBy(DependencyObject) GetLabeledBy(DependencyObject) GetLabeledBy(DependencyObject) GetLabeledBy(DependencyObject)

Gets the value of the AutomationProperties.LabeledBy attached property for the specified DependencyObject.

GetLandmarkType(DependencyObject) GetLandmarkType(DependencyObject) GetLandmarkType(DependencyObject) GetLandmarkType(DependencyObject)

Gets the value of the landmark type attached property for the specified DependencyObject.

GetLevel(DependencyObject) GetLevel(DependencyObject) GetLevel(DependencyObject) GetLevel(DependencyObject)

Gets the value of the property for the specified .

GetLiveSetting(DependencyObject) GetLiveSetting(DependencyObject) GetLiveSetting(DependencyObject) GetLiveSetting(DependencyObject)

Gets the value of the AutomationProperties.LiveSetting attached property for the specified DependencyObject.

GetLocalizedControlType(DependencyObject) GetLocalizedControlType(DependencyObject) GetLocalizedControlType(DependencyObject) GetLocalizedControlType(DependencyObject)

Gets a localized string that indicates the type of the specified control.

GetLocalizedLandmarkType(DependencyObject) GetLocalizedLandmarkType(DependencyObject) GetLocalizedLandmarkType(DependencyObject) GetLocalizedLandmarkType(DependencyObject)

Gets the value of the localized landmark type attached property for the specified DependencyObject.

GetName(DependencyObject) GetName(DependencyObject) GetName(DependencyObject) GetName(DependencyObject)

Gets the value of the AutomationProperties.Name attached property for the specified DependencyObject.

GetPositionInSet(DependencyObject) GetPositionInSet(DependencyObject) GetPositionInSet(DependencyObject) GetPositionInSet(DependencyObject)

Gets the value of the property for the specified .

GetSizeOfSet(DependencyObject) GetSizeOfSet(DependencyObject) GetSizeOfSet(DependencyObject) GetSizeOfSet(DependencyObject)

Gets the value of the property for the specified .

SetAcceleratorKey(DependencyObject, String) SetAcceleratorKey(DependencyObject, String) SetAcceleratorKey(DependencyObject, String) SetAcceleratorKey(DependencyObject, String)

Sets the value of the AutomationProperties.AcceleratorKey attached property for the specified DependencyObject.

SetAccessibilityView(DependencyObject, AccessibilityView) SetAccessibilityView(DependencyObject, AccessibilityView) SetAccessibilityView(DependencyObject, AccessibilityView) SetAccessibilityView(DependencyObject, AccessibilityView)

Sets the value of the AutomationProperties.AccessibilityView attached property for the specified DependencyObject.

SetAccessKey(DependencyObject, String) SetAccessKey(DependencyObject, String) SetAccessKey(DependencyObject, String) SetAccessKey(DependencyObject, String)

Sets the value of the AutomationProperties.AccessKey attached property for the specified DependencyObject.

SetAutomationId(DependencyObject, String) SetAutomationId(DependencyObject, String) SetAutomationId(DependencyObject, String) SetAutomationId(DependencyObject, String)

Sets the value of the AutomationProperties.AutomationId attached property for the specified DependencyObject.

SetCulture(DependencyObject, Int32) SetCulture(DependencyObject, Int32) SetCulture(DependencyObject, Int32) SetCulture(DependencyObject, Int32)

Sets the value of the CultureProperty attached property for the specified DependencyObject.

SetFullDescription(DependencyObject, String) SetFullDescription(DependencyObject, String) SetFullDescription(DependencyObject, String) SetFullDescription(DependencyObject, String)

Sets a localized string that describes the visual appearance or contents of the specified DependencyObject.

SetHeadingLevel(DependencyObject, AutomationHeadingLevel) SetHeadingLevel(DependencyObject, AutomationHeadingLevel) SetHeadingLevel(DependencyObject, AutomationHeadingLevel) SetHeadingLevel(DependencyObject, AutomationHeadingLevel)

Sets the value of the AutomationProperties.HeadingLevel property for the specified DependencyObject.

SetHelpText(DependencyObject, String) SetHelpText(DependencyObject, String) SetHelpText(DependencyObject, String) SetHelpText(DependencyObject, String)

Sets the value of the AutomationProperties.HelpText attached property for the specified DependencyObject.

SetIsDataValidForForm(DependencyObject, Boolean) SetIsDataValidForForm(DependencyObject, Boolean) SetIsDataValidForForm(DependencyObject, Boolean) SetIsDataValidForForm(DependencyObject, Boolean)

Sets a Boolean value that indicates whether the entered or selected value is valid for the form rule associated with the specified element.

SetIsPeripheral(DependencyObject, Boolean) SetIsPeripheral(DependencyObject, Boolean) SetIsPeripheral(DependencyObject, Boolean) SetIsPeripheral(DependencyObject, Boolean)

Sets a Boolean value that indicates whether the specified element represents peripheral UI.

SetIsRequiredForForm(DependencyObject, Boolean) SetIsRequiredForForm(DependencyObject, Boolean) SetIsRequiredForForm(DependencyObject, Boolean) SetIsRequiredForForm(DependencyObject, Boolean)

Sets the value of the AutomationProperties.IsRequiredForForm attached property for the specified DependencyObject.

SetItemStatus(DependencyObject, String) SetItemStatus(DependencyObject, String) SetItemStatus(DependencyObject, String) SetItemStatus(DependencyObject, String)

Sets the value of the AutomationProperties.ItemStatus attached property for the specified DependencyObject.

SetItemType(DependencyObject, String) SetItemType(DependencyObject, String) SetItemType(DependencyObject, String) SetItemType(DependencyObject, String)

Sets the value of the AutomationProperties.ItemType attached property for the specified DependencyObject.

SetLabeledBy(DependencyObject, UIElement) SetLabeledBy(DependencyObject, UIElement) SetLabeledBy(DependencyObject, UIElement) SetLabeledBy(DependencyObject, UIElement)

Sets the value of the AutomationProperties.LabeledBy attached property for the specified DependencyObject.

SetLandmarkType(DependencyObject, AutomationLandmarkType) SetLandmarkType(DependencyObject, AutomationLandmarkType) SetLandmarkType(DependencyObject, AutomationLandmarkType) SetLandmarkType(DependencyObject, AutomationLandmarkType)

Sets the value of the landmark type attached property for the specified DependencyObject.

SetLevel(DependencyObject, Int32) SetLevel(DependencyObject, Int32) SetLevel(DependencyObject, Int32) SetLevel(DependencyObject, Int32)

Sets the value of the AutomationProperties.Level attached property for the specified DependencyObject.

SetLiveSetting(DependencyObject, AutomationLiveSetting) SetLiveSetting(DependencyObject, AutomationLiveSetting) SetLiveSetting(DependencyObject, AutomationLiveSetting) SetLiveSetting(DependencyObject, AutomationLiveSetting)

Sets the value of the AutomationProperties.LiveSetting attached property for the specified DependencyObject.

SetLocalizedControlType(DependencyObject, String) SetLocalizedControlType(DependencyObject, String) SetLocalizedControlType(DependencyObject, String) SetLocalizedControlType(DependencyObject, String)

Sets a localized string that indicates the type of the specified control.

SetLocalizedLandmarkType(DependencyObject, String) SetLocalizedLandmarkType(DependencyObject, String) SetLocalizedLandmarkType(DependencyObject, String) SetLocalizedLandmarkType(DependencyObject, String)

Sets the value of the localized landmark type attached property for the specified DependencyObject.

SetName(DependencyObject, String) SetName(DependencyObject, String) SetName(DependencyObject, String) SetName(DependencyObject, String)

Sets the value of the AutomationProperties.Name attached property for the specified DependencyObject.

SetPositionInSet(DependencyObject, Int32) SetPositionInSet(DependencyObject, Int32) SetPositionInSet(DependencyObject, Int32) SetPositionInSet(DependencyObject, Int32)

Sets the value of the AutomationProperties.PositionInSet attached property for the specified DependencyObject.

SetSizeOfSet(DependencyObject, Int32) SetSizeOfSet(DependencyObject, Int32) SetSizeOfSet(DependencyObject, Int32) SetSizeOfSet(DependencyObject, Int32)

Sets the value of the AutomationProperties.SizeOfSet attached property for the specified DependencyObject.

See Also