Custom Property Conditions
Hello all,
I have a question regarding the TreeWalker sample and UI automation in general.
Say, for example, I have a UI that contains several panes, with the automation ID's BrowsePane1, BrowsePane2, ..., etc, and I want to retrieve all of these. Assuming that I have an AutomationElement rootElement, I want to call rootElement.FindAll(TreeScope.Element | TreeScope.Descendants, condition), where my condition is such that I can retrieve all the elements that have an automation identifier that begins with "BrowsePane". Essentially, I want my condition to be thatAutomationElement.AutomationIdProperty.ToString().StartsWith("BrowsePane")evaluates to true.
Is there any way to create an object of (base)type System.Windows.Automation.Condition so that I can do this (e.g. something that takes a Boolean function as an argument) using the existing library, or will I have to create my own subclass to do this?
Thanks.
JLutz

