TreeWalker.GetPreviousSibling 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
擷取指定 AutomationElement的前一個兄弟節點。
多載
| 名稱 | Description |
|---|---|
| GetPreviousSibling(AutomationElement) |
擷取指定 AutomationElement的前一個兄弟節點。 |
| GetPreviousSibling(AutomationElement, CacheRequest) |
擷取指定的 AutomationElement 前一個兄弟節點,並快取屬性與模式。 |
備註
An AutomationElement 可能有額外的兄弟元素,這些元素與目前的視圖條件不符,因此在元素樹中導航時不會回傳。
樹狀 AutomationElement 結構會隨著桌面上可見的使用者介面(UI)元素變化而改變。 不保證先前作為兄弟元素回傳的元素,後續執行時也會回傳為前一個兄弟。
GetPreviousSibling(AutomationElement)
擷取指定 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
參數
- element
- AutomationElement
用來取回前一個兄弟姊妹的元素。
傳回
前一個兄弟元素,或若不存在空參考(Nothing in Visual Basic),則為該元素。
備註
An AutomationElement 可能有額外的兄弟元素,這些元素與目前的視圖條件不符,因此在元素樹中導航時不會回傳。
樹狀 AutomationElement 結構會隨著桌面上可見的使用者介面(UI)元素變化而改變。 不保證先前作為兄弟元素回傳的元素,後續執行時也會回傳為前一個兄弟。
另請參閱
適用於
GetPreviousSibling(AutomationElement, CacheRequest)
擷取指定的 AutomationElement 前一個兄弟節點,並快取屬性與模式。
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
參數
- element
- AutomationElement
用來取回前一個兄弟姊妹的元素。
- request
- CacheRequest
一個快取請求物件,指定返回 AutomationElement 快取的屬性與模式。
傳回
前一個兄弟元素,或若不存在空參考(Nothing in Visual Basic),則為該元素。
備註
An AutomationElement 可能有額外的兄弟元素,這些元素與目前的視圖條件不符,因此在元素樹中導航時不會回傳。
樹狀 AutomationElement 結構會隨著桌面上可見的使用者介面(UI)元素變化而改變。 不保證先前作為兄弟元素回傳的元素,後續執行時也會回傳為前一個兄弟。