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
Inherited Members
Namespace: System.Windows.Automation
Assembly: OpenSilver.dll
Syntax
public static class AutomationProperties
Fields
| Improve this Doc View SourceAcceleratorKeyProperty
Identifies the AutomationProperties.AcceleratorKey attached property.
Declaration
public static readonly DependencyProperty AcceleratorKeyProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
AccessKeyProperty
Identifies the AutomationProperties.AccessKey attached property.
Declaration
public static readonly DependencyProperty AccessKeyProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
AutomationIdProperty
Identifies the AutomationProperties.AutomationId attached property.
Declaration
public static readonly DependencyProperty AutomationIdProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
HelpTextProperty
Identifies the AutomationProperties.HelpText attached property.
Declaration
public static readonly DependencyProperty HelpTextProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsRequiredForFormProperty
Identifies the AutomationProperties.IsRequiredForForm attached property.
Declaration
public static readonly DependencyProperty IsRequiredForFormProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ItemStatusProperty
Identifies the AutomationProperties.ItemStatus attached property.
Declaration
public static readonly DependencyProperty ItemStatusProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ItemTypeProperty
Identifies the AutomationProperties.ItemType attached property.
Declaration
public static readonly DependencyProperty ItemTypeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
LabeledByProperty
Identifies the AutomationProperties.LabeledBy attached property.
Declaration
public static readonly DependencyProperty LabeledByProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
NameProperty
Identifies the AutomationProperties.Name attached property.
Declaration
public static readonly DependencyProperty NameProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Methods
| Improve this Doc View SourceGetAcceleratorKey(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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|