ItemContainerPattern.FindItemByProperty(AutomationElement, AutomationProperty, Object) 方法

定義

依指定的屬性值擷取項目。Retrieves an element by the specified property value.

public:
 System::Windows::Automation::AutomationElement ^ FindItemByProperty(System::Windows::Automation::AutomationElement ^ startAfter, System::Windows::Automation::AutomationProperty ^ property, System::Object ^ value);
public System.Windows.Automation.AutomationElement FindItemByProperty (System.Windows.Automation.AutomationElement startAfter, System.Windows.Automation.AutomationProperty property, object value);
member this.FindItemByProperty : System.Windows.Automation.AutomationElement * System.Windows.Automation.AutomationProperty * obj -> System.Windows.Automation.AutomationElement
Public Function FindItemByProperty (startAfter As AutomationElement, property As AutomationProperty, value As Object) As AutomationElement

參數

startAfter
AutomationElement

容器中的項目,從這個項目之後要開始搜尋。The item in the container after which to begin the search.

property
AutomationProperty

包含要擷取之值的屬性。The property that contains the value to retrieve.

value
Object

要擷取的值。The value to retrieve.

傳回

AutomationElement

符合搜尋準則的第一個項目,如果沒有符合的項目則為 nullThe first item that matches the search criterion; otherwise, null if no items match.

備註

propertyId 參數設定為 0 ,以在之後取得下一個專案 startAfter ,而不考慮中指定的值 valueSet the propertyId parameter to 0 to retrieve the next item after startAfter, regardless of the value specified in value. 設定 startAfternull 以開始搜尋第一個專案。Set startAfter to null to start the search with the first item.

適用於