The System.Windows.Automation.AutomationElement is a class in the C# language that belongs to the System.Windows.Automation namespace library. This class is used in UI Automation technology to represent an element in a user interface, such as a button, menu, or text box.
This code initializes an AutomationElement object to the root element of the UI Automation tree, which represents the desktop. Then, it finds the first descendant element of the root element that has a name property equal to "Calculator", and initializes another AutomationElement object to this element.
This code initializes an AutomationElement object to the currently focused element in the UI Automation tree, which represents an instance of the Notepad application. Then, it finds the first descendant element of the focused element that has a ControlType property equal to ControlType.Document, and initializes another AutomationElement object to this element.
Both of these code examples use the AutomationElement class to navigate the UI Automation tree and find specific elements within it. This class is part of the System.Windows.Automation package library, which is included in the .NET Framework SDK.
C# (CSharp) System.Windows.Automation AutomationElement - 60 examples found. These are the top rated real world C# (CSharp) examples of System.Windows.Automation.AutomationElement extracted from open source projects. You can rate examples to help us improve the quality of examples.