src/runtimes/netf/Azos.WinForms/Utils.cs
/// <summary>
/// Walks the whole child control tree and returns all controls as a flat enumeration
/// </summary>
Walks the whole child control tree and returns all controls as a flat enumeration
Walks the whole child control tree and returns all controls as a flat enumeration
public static IEnumerable<Control> AllChildControls(Control ctl)
    {
      if (ctl==null) yield break;
      foreach (Control c in ctl.Controls)
      {
        yield return c;
        foreach(Control subc in AllChildControls(c))
           yield return subc;
      }
    }
public static IEnumerable < Control > AllChildControls ( Control ctl ) { if ( ctl == null ) yield break ; foreach ( Control c in ctl . Controls ) { yield return c ; foreach ( Control subc in AllChildControls ( c ) ) yield return subc ; } }
Walks the whole child control tree and returns all controls as a flat enumeration
Walks the whole child control tree and returns all controls as a flat enumeration
ctl
Control