title: Loop devexpress controls WinForms
body: <p>I want to loop through all of the controls in a Windows Form, and get their names.</p>
  
  <p>I did this easily with recursion, but since the Form includes DevExpress controls a problem occurs.</p>
  
  <p>An example is a control of the type RibbonControl (DevExpress control) - the problem is that this control does NOT have children. I inspected the RibbonControl, and saw that it has a property called "Items" which includes the children for this DevExpress control.</p>
  
  <p>So my question is, is there a way to loop through the children of DevExpress controls like this one?
  I tried with Control.Items, but this does not work unless the control is casted to a RibbonControl, and this is not a good approach, since there are more types (which i still don't know) that have "items" instead of "children". </p>
  
  <pre><code>foreach (Control control in c.Controls)
  {
      if (control.GetType() == typeof(RibbonControl))
      {
          var ribbonCnt = (RibbonControl) control;
          foreach (var cnt in ribbonCnt.Items)
          {
          }
      }
  }
  </code></pre>
  
  <p>This is the way i currently get the children (items) of the RibbonControl, but since this control may vary - this doesn't seem like a good approach.</p>