Current Property

AutomationElement.Current Property

 

Gets the current property values of the AutomationElement.

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

member Current : AutomationElement.AutomationElementInformation with get

Property Value

Type: System.Windows.Automation.AutomationElement.AutomationElementInformation

A structure containing the current property values.

Exception Condition
ElementNotAvailableException

The UI for the AutomationElement no longer exists.

The accessors for UI Automation properties are represented as properties of the structure returned by Current. You do not need to retrieve the structure; you can access its members directly, as in the example below. For specific information on the properties available and their use, see AutomationElement.AutomationElementInformation.

To get the cached value of UI Automation properties on this element, use the Cached property.

The following example shows how the Current property is used to retrieve the name of an item that has been selected in a list.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft