title: search WPF Treeview for specific TreeViewItem
body: <p>I am working with a wpf <code>TreeView</code>. I am trying to search through all of the items in the <code>TreeView</code> to find the desired <code>TreeViewItem</code> within it. </p>
  
  <h2>my code:</h2>
  
  <p><code>parent</code> is a <code>string</code> of the header of the desired item I am searching for.</p>
  
  <pre><code>foreach (TreeViewItem item in treeView.Items)
  {    
     if (item.Header.ToString().Contains(parent))
     {
         //Do Something to item that is found 
     }
  }
  </code></pre>
  
  <p>The problem that I am having with this code is that it will search through the top two layers of the <code>TreeView</code>. If there is a <code>item</code> within a <code>item</code> within the <code>TreeView</code>, then the <code>item</code> is not found.  With that being said I added to my code but it only prolonged the issue another level into the <code>TreeView</code>.</p>
  
  <pre><code>foreach (TreeViewItem item in treeView.Items)
  {
     foreach(TreeViewItem subItem in item.Items)
     {
         if (subItem.Header.ToString().Contains(parent))
         {
             //Do Something to item that is found         
         }
     }    
     if (item.Header.ToString().Contains(parent))
     {
         //Do Something to item that is found 
     }
  }
  </code></pre>
  
  <p>Is there a way to search through the entire <code>TreeView</code> along with all the <code>items</code> within it? Could I possible search the <code>TreeView</code> recursively?</p>