Menu

FindAll() problem!

Help
KenNguyen
2010-10-27
2013-05-28
  • KenNguyen

    KenNguyen - 2010-10-27

    Hi team,
    Here is the code from API:

    UIAPane programManager = Desktop.UIA as UIAPane;
    //Since shortcuts is 2 level below the scope is Descendants
    UIControl  myShortcuts = programManager.FindAll(
                       System.Windows.Automation.TreeScope.Descendants,
                       FindProperties.Type, "UIAListItem") ;

    if (myShortcuts != null)//not found above
         myShortcuts.DoubleClick();
    else
         MessageBox.Show("shortcut Not found");

    There are 2 namespace or type that my VS can't indentifies: UIControl and FindProperties.

    Thanks for reading,
    Ken

     
  • KenNguyen

    KenNguyen - 2010-10-27

    I've tried with List<UIControlBase> and it done.!

     

Log in to post a comment.