Show / Hide Table of Contents

Class AutomationProperties

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
System.Object
AutomationProperties
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Automation
Assembly: OpenSilver.dll
Syntax
public static class AutomationProperties

Fields

| Improve this Doc View Source

AcceleratorKeyProperty

Identifies the AutomationProperties.AcceleratorKey attached property.

Declaration
public static readonly DependencyProperty AcceleratorKeyProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

AccessKeyProperty

Identifies the AutomationProperties.AccessKey attached property.

Declaration
public static readonly DependencyProperty AccessKeyProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

AutomationIdProperty

Identifies the AutomationProperties.AutomationId attached property.

Declaration
public static readonly DependencyProperty AutomationIdProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

HelpTextProperty

Identifies the AutomationProperties.HelpText attached property.

Declaration
public static readonly DependencyProperty HelpTextProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

IsRequiredForFormProperty

Identifies the AutomationProperties.IsRequiredForForm attached property.

Declaration
public static readonly DependencyProperty IsRequiredForFormProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ItemStatusProperty

Identifies the AutomationProperties.ItemStatus attached property.

Declaration
public static readonly DependencyProperty ItemStatusProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ItemTypeProperty

Identifies the AutomationProperties.ItemType attached property.

Declaration
public static readonly DependencyProperty ItemTypeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LabeledByProperty

Identifies the AutomationProperties.LabeledBy attached property.

Declaration
public static readonly DependencyProperty LabeledByProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

NameProperty

Identifies the AutomationProperties.Name attached property.

Declaration
public static readonly DependencyProperty NameProperty
Field Value
Type Description
DependencyProperty

Methods

| Improve this Doc View Source

GetAcceleratorKey(DependencyObject)

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

Declaration
public static string GetAcceleratorKey(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.String
Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetAccessKey(DependencyObject)

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

Declaration
public static string GetAccessKey(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.String

The access key, as a string.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetAutomationId(DependencyObject)

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

Declaration
public static string GetAutomationId(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.String

The UI Automation identifier for the specified element.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetHelpText(DependencyObject)

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

Declaration
public static string GetHelpText(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.String

The help text for the specified element.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetIsRequiredForForm(DependencyObject)

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

Declaration
public static bool GetIsRequiredForForm(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.Boolean

true if the specified element is required for completion of a form; otherwise, false.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetItemStatus(DependencyObject)

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

Declaration
public static string GetItemStatus(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.String

The item status of the element.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetItemType(DependencyObject)

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

Declaration
public static string GetItemType(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.String

The item type of the element.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetLabeledBy(DependencyObject)

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

Declaration
public static UIElement GetLabeledBy(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
UIElement

The element that is targeted by the label.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

GetName(DependencyObject)

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

Declaration
public static string GetName(DependencyObject element)
Parameters
Type Name Description
DependencyObject element

The DependencyObject to check.

Returns
Type Description
System.String

The name of the specified element.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetAcceleratorKey(DependencyObject, String)

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

Declaration
public static void SetAcceleratorKey(DependencyObject element, string value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.String value

The accelerator key value to set.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetAccessKey(DependencyObject, String)

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

Declaration
public static void SetAccessKey(DependencyObject element, string value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.String value

The access key value to set.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetAutomationId(DependencyObject, String)

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

Declaration
public static void SetAutomationId(DependencyObject element, string value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.String value

The UI automation identifier value to set.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetHelpText(DependencyObject, String)

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

Declaration
public static void SetHelpText(DependencyObject element, string value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.String value

The help text.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetIsRequiredForForm(DependencyObject, Boolean)

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

Declaration
public static void SetIsRequiredForForm(DependencyObject element, bool value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.Boolean value

true to specify that the element is required to be filled out on a form; otherwise, false.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetItemStatus(DependencyObject, String)

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

Declaration
public static void SetItemStatus(DependencyObject element, string value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.String value

The item status.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetItemType(DependencyObject, String)

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

Declaration
public static void SetItemType(DependencyObject element, string value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.String value

The item type.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetLabeledBy(DependencyObject, UIElement)

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

Declaration
public static void SetLabeledBy(DependencyObject element, UIElement value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

UIElement value

The UI element that represents the label for element.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

SetName(DependencyObject, String)

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

Declaration
public static void SetName(DependencyObject element, string value)
Parameters
Type Name Description
DependencyObject element

The DependencyObject for which to set the property.

System.String value

The object name.

Exceptions
Type Condition
System.ArgumentException

element is invalid value.

System.ArgumentNullException

element is null.

  • Improve this Doc
  • View Source