AutomationElement.CachedParent Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the cached parent of this AutomationElement.

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

member CachedParent : AutomationElement with get

Property Value

Type: System.Windows.Automation.AutomationElement

The parent element. The return value can be null if the specified element has no parent—for example, if this element is the root node.

Exception Condition
InvalidOperationException

No parent element is cached.

ElementNotAvailableException

The UI for the AutomationElement no longer exists.

In the following example, the Name properties of a list box and its list items are cached. The list box element is available in the CachedParent property of each list item element.

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

.NET Framework
Available since 3.0
Return to top
Show: