title: Removing Children from a StackPanel
body: <pre><code>for(int i = 0; i &lt; stackPanel.Children.Count; i++)
  {
       stackPanel.Children.Remove(stackPanel.Children[i]);
  }
  int x  = stackPanel.Children.Count();
  </code></pre>
  
  <p>After running the above code. The controls are still on the screen. Then x equals 33. So how do I really remove the children?</p>