Здравствуйте, TK, Вы писали:
TK>Не факт, что в вашем случае нужна рекурсия. Смотрите на TreeScope.Subtree или TreeScope.Descendants
Смотрел.
var children = AutomationElement.RootElement.FindAll(TreeScope.Descendants,
new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window));
и
var children = AutomationElement.RootElement.FindAll(TreeScope.Subtree,
new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window));
работает слишком долго или подвисает. Во всяком случае, я результата не дождался.