TreeWalker.GetPreviousSibling Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- UI Automation Tree Overview
- Navigate Among UI Automation Elements with TreeWalker
- Obtaining UI Automation Elements
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
- UI Automation Tree Overview
- Navigate Among UI Automation Elements with TreeWalker
- Obtaining UI Automation Elements