title: UI Automation and Ribbon control
body: <p>I do automation for WPF application using UIAutomation API. Everything went fine until I hit the Ribbon control. I have no trouble to see information about Ribbon and its children through the Inspect.exe, but inside the code I cannot obtain the information about those elements.</p>
  
  <p>It other words,  in this code  aeElement is always null:</p>
  
  <pre><code>aeElement = aeForm.FindFirst(TreeScope.Children,
                    new PropertyCondition(AutomationElement.NameProperty, "XXX"));
  </code></pre>
  
  <p>I tried <code>TreeScope.Descendants</code> and <code>TreeScope.Elements</code>.
  I tried <code>AutomationElement.ControlTypeProperty</code> and <code>AutomationElement.AutomationIdProperty</code>.
  I tried <code>TreeWalker</code> – nothing worked.</p>
  
  <p>Wondering if there is a solution for that issue?
  Thank you very much in advance.</p>
  
  <p>EDIT: There is no answer at <a href="http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=windowsaccessibilityandautomation" rel="nofollow">http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=windowsaccessibilityandautomation</a> either. </p>