TreeWalker.GetLastChild Method

Definition

Retrieves the last child element of the specified AutomationElement.

Overloads

GetLastChild(AutomationElement)

Retrieves the last child element of the specified AutomationElement.

GetLastChild(AutomationElement, CacheRequest)

Retrieves the last child element of the specified AutomationElement and caches properties and patterns.

Remarks

An AutomationElement can have additional child elements that do not match the current view condition and thus are not returned when navigating the element tree.

The structure of the AutomationElement tree changes as the visible user interface (UI) elements on the desktop change. It is not guaranteed that an element returned as the last child element will be returned as the last child on subsequent passes.

GetLastChild(AutomationElement)

Retrieves the last child element of the specified AutomationElement.

public:
 System::Windows::Automation::AutomationElement ^ GetLastChild(System::Windows::Automation::AutomationElement ^ element);
public System.Windows.Automation.AutomationElement GetLastChild (System.Windows.Automation.AutomationElement element);
member this.GetLastChild : System.Windows.Automation.AutomationElement -> System.Windows.Automation.AutomationElement
Public Function GetLastChild (element As AutomationElement) As AutomationElement

Parameters

element
AutomationElement

The element from which to retrieve the last child.

Returns

The AutomationElement that is the last child element, or a null reference (Nothing in Visual Basic) if there is no such element.

Remarks

An AutomationElement can have additional child elements that do not match the current view condition and thus are not returned when navigating the element tree.

The structure of the AutomationElement tree changes as the visible user interface (UI) elements on the desktop change. It is not guaranteed that an element returned as the last child element will be returned as the last child on subsequent passes.

See also

GetLastChild(AutomationElement, CacheRequest)

Retrieves the last child element of the specified AutomationElement and caches properties and patterns.

public:
 System::Windows::Automation::AutomationElement ^ GetLastChild(System::Windows::Automation::AutomationElement ^ element, System::Windows::Automation::CacheRequest ^ request);
public System.Windows.Automation.AutomationElement GetLastChild (System.Windows.Automation.AutomationElement element, System.Windows.Automation.CacheRequest request);
member this.GetLastChild : System.Windows.Automation.AutomationElement * System.Windows.Automation.CacheRequest -> System.Windows.Automation.AutomationElement
Public Function GetLastChild (element As AutomationElement, request As CacheRequest) As AutomationElement

Parameters

element
AutomationElement

The element from which to retrieve the last child.

request
CacheRequest

A cache request object specifying properties and patterns on the returned AutomationElement to cache.

Returns

The last element, or a null reference (Nothing in Visual Basic) if there is no such element.

Remarks

An AutomationElement can have additional child elements that do not match the current view condition and thus are not returned when navigating the element tree.

The structure of the AutomationElement tree changes as the visible user interface (UI) elements on the desktop change. It is not guaranteed that an element returned as the last child element will be returned as the last child on subsequent passes.

See also

Applies to