Редагувати

Поділитися через


TreeWalker.GetPreviousSibling Method

Definition

Retrieves the previous sibling of the specified AutomationElement.

Overloads

GetPreviousSibling(AutomationElement)

Retrieves the previous sibling of the specified AutomationElement.

GetPreviousSibling(AutomationElement, CacheRequest)

Retrieves the previous sibling of the specified AutomationElement and caches properties and patterns.

Remarks

An AutomationElement can have additional sibling 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 previous sibling element will be returned as the previous sibling on subsequent passes.

GetPreviousSibling(AutomationElement)

Retrieves the previous sibling of the specified AutomationElement.

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

Parameters

element
AutomationElement

The element from which to retrieve the previous sibling.

Returns

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

Remarks

An AutomationElement can have additional sibling 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 previous sibling element will be returned as the previous sibling on subsequent passes.

See also

Applies to

GetPreviousSibling(AutomationElement, CacheRequest)

Retrieves the previous sibling of the specified AutomationElement and caches properties and patterns.

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

Parameters

element
AutomationElement

The element from which to retrieve the previous sibling.

request
CacheRequest

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

Returns

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

Remarks

An AutomationElement can have additional sibling 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 previous sibling element will be returned as the previous sibling on subsequent passes.

See also

Applies to