AutomationElement.NotSupported Field

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Indicates that a property is not supported.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

public static readonly object NotSupported

Field Value

Type: System.Object

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

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;

.NET Framework
Available since 3.0
Return to top
Show: