title: How to get the child control inside a TreeviewItem?
body: <p>I customed my TreeViewItem to be a <code>StackPanel</code> with <code>image</code> and <code>textblock</code> inside; I'd like to get a reference to the <code>TextBlock</code> inside. For the codes below <code>node</code> is of type <code>TreeviewItem</code> and I am sure<code>childrenCound =3</code> which could be <code>StackPanel image textblock</code>! But it can not find any <code>TextBlock</code> inside. I never see any console output and <code>object _itemToMove</code>returns <code>null</code></p>
  
  <pre><code>TreeViewItem node = UIHelper.FindVisualParent&lt;TreeViewItem&gt;(e.OriginalSource as FrameworkElement);
  var child = VisualTreeHelper.GetChild(node, 0);
  int childrenCount = VisualTreeHelper.GetChildrenCount(child);
  for (int i = 0; i &lt; childrenCount; i++)
  {
      TextBlock vc = VisualTreeHelper.GetChild(child, i) as TextBlock;
      if (vc != null)
      {
          Console.WriteLine("ggggggggggggggggggggggggggggggggggggggggggggggg");
  
          _itemToMove = vc.Text as object;
      }
  
  }
  Console.WriteLine(childrenCount+";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;");
  </code></pre>