AutomationElement.AutomationElementInformation Structure
Assembly: UIAutomationClient (in UIAutomationClient.dll)
The properties can be accessed directly from Cached and Current; you do not need to retrieve the AutomationElement.AutomationElementInformation structure itself.
The properties in this structure can also be retrieved by using GetCurrentPropertyValue and GetCachedPropertyValue, using the corresponding identifiers from AutomationElement. For example, The AutomationElement.AutomationElementInformation.AcceleratorKey property is identified by the AutomationElement.AcceleratorKeyProperty field. More information about the individual properties is available on the reference pages for those identifiers; see the link in the Remarks section of each reference topic.
The following example shows how the Name property is retrieved from this structure.
''' <summary> ''' Handles ElementSelected events by showing a message. ''' </summary> ''' <param name="src">Object that raised the event; in this case, a list item.</param> ''' <param name="e">Event arguments.</param> Private Sub OnSelect(ByVal src As Object, ByVal e As AutomationEventArgs) ' Get the name of the item, which is equivalent to its text. Dim element As AutomationElement = DirectCast(src, AutomationElement) If (element IsNot Nothing) Then Console.WriteLine(element.Current.Name + " was selected.") End If End Sub 'OnSelect
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.