AutomationElement.NotSupported Field

Definition

Indicates that a property is not supported.

public: static initonly System::Object ^ NotSupported;
public static readonly object NotSupported;
 staticval mutable NotSupported : obj
Public Shared ReadOnly NotSupported As Object 

Field Value

Examples

The following example retrieves the help text property for an AutomationElement, specifying that NotSupported should be returned if the control does not support that property.

// elementList is an AutomationElement.
object help = elementList.GetCurrentPropertyValue(AutomationElement.HelpTextProperty, true);
if (help == AutomationElement.NotSupported)
{
    help = "No help available";
}
string helpText = (string)help;
' elementList is an AutomationElement.
Dim help As Object = elementList.GetCurrentPropertyValue(AutomationElement.HelpTextProperty, True)
If help Is AutomationElement.NotSupported Then
    help = "No help available"
End If
Dim helpText As String = CStr(help)

Remarks

This identifier is used by UI Automation client applications. UI Automation providers should use the equivalent identifier in AutomationElementIdentifiers.

Applies to

See also