Automation.PropertyName Method (AutomationProperty)

 

Retrieves the name of the specified UI Automation property.

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

public static string PropertyName(
	AutomationProperty property
)

Parameters

property
Type: System.Windows.Automation.AutomationProperty

The UI Automation property identifier of the named property.

Return Value

Type: System.String

The friendly name of the UI Automation property, or a null reference (Nothing in Microsoft Visual Basic .NET) if the specified UI Automation property is not found.

The following example displays the name of each property supported by an AutomationElement.

AutomationProperty[] properties = element.GetSupportedProperties();
foreach (AutomationProperty prop in properties)
{
    Console.WriteLine(prop.ProgrammaticName);
    Console.WriteLine(Automation.PropertyName(prop));
}

.NET Framework
Available since 3.0
Return to top
Show: