AutomationElement.AutomationElementInformation Structure
![]() |
---|
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience. |
Assembly: UIAutomationClient (in UIAutomationClient.dll)
Name | Description | |
---|---|---|
![]() | AcceleratorKey | Gets a string containing the accelerator key combinations for the element. |
![]() | AccessKey | Gets a string containing the access key character for the element. |
![]() | AutomationId | Gets a string containing the UI Automation identifier (ID) for the element. |
![]() | BoundingRectangle | Gets the coordinates of the rectangle that completely encloses the element. |
![]() | ClassName | Gets a string containing the class name of the element as assigned by the control developer. |
![]() | ControlType | Gets the ControlType of the element. |
![]() | FrameworkId | Gets the name of the underlying UI framework. |
![]() | HasKeyboardFocus | Gets a value that indicates whether the element has keyboard focus. |
![]() | HelpText | Gets the help text associated with the element. |
![]() | IsContentElement | Gets a value that specifies whether the element is a content element. |
![]() | IsControlElement | Gets a value that indicates whether the element is viewed as a control. |
![]() | IsEnabled | Gets a value that indicates whether the user interface (UI) item referenced by the UI Automation element is enabled. |
![]() | IsKeyboardFocusable | Gets a value that indicates whether the UI Automation element can accept keyboard focus. |
![]() | IsOffscreen | Gets a value that indicates whether the UI Automation element is visible on the screen. |
![]() | IsPassword | Gets a value that indicates whether the UI Automation element contains protected content. |
![]() | IsRequiredForForm | Gets a value that indicates whether the UI Automation element is required to be filled out on a form. |
![]() | ItemStatus | Gets a description of the status of an item within an element. |
![]() | ItemType | Gets a description of the type of an item. |
![]() | LabeledBy | Gets the element that contains the text label for this element. |
![]() | LocalizedControlType | Gets a description of the control type. |
![]() | Name | Gets the name of the element. |
![]() | NativeWindowHandle | Gets the handle of the element's window. |
![]() | Orientation | Gets the orientation of the control. |
![]() | ProcessId | Gets the process identifier (ID) of this element. |
Name | Description | |
---|---|---|
![]() | Equals(Object) | Indicates whether this instance and a specified object are equal.(Inherited from ValueType.) |
![]() | GetHashCode() | Returns the hash code for this instance.(Inherited from ValueType.) |
![]() | GetType() | |
![]() | ToString() | Returns the fully qualified type name of this instance.(Inherited from ValueType.) |
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 void OnSelect(object src, AutomationEventArgs e) { // Get the name of the item, which is equivalent to its text. AutomationElement element = src as AutomationElement; if (element != null) { Console.WriteLine(element.Current.Name + " was selected."); } }
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.