title: Clear all TextBox in Window
body: <p>I'm programming in c#(WPF). I have a lot of <code>nested controls</code>. I want to <code>clear all</code> of my TextBox control which are in my application. It is very hard to access them by their name. Is there any way to access them <code>recursively</code> and clear them?</p>
  
  <p>for example some thing like this:</p>
  
  <pre><code>public void ClearAll(Control c)
  {
      if(c is TextBox)
      {
          ((TextBox)c).Clear();
          return;
      }
  
      foreach(Control child in GetChild(c))
      {
          ClearAll(child);
      }
  }
  </code></pre>