This documentation is archived and is not being maintained.

AutomationElement.GetCurrentPropertyValue Method

Retrieves the current value of the specified property from an AutomationElement.

Name Description
AutomationElement.GetCurrentPropertyValue (AutomationProperty) Retrieves the value of the specified property on this AutomationElement. An appropriate default value for the property type is returned for properties not explicitly supported by the target user interface (UI) element.
AutomationElement.GetCurrentPropertyValue (AutomationProperty, Boolean) Retrieves the value of the specified property on this AutomationElement, optionally ignoring any default property.

The value returned by the GetCurrentPropertyValue method is current at the time it is called. The value can subsequently change by other applications interacting with the user interface (UI).

For some forms of UI, this method will incur cross-process performance overhead. Applications can concentrate overhead by caching properties and then retrieving them by using GetCachedPropertyValue.