title: wPF VisualTreeHelper.GetParent returns wrong class?
body: <p>I have the following XAML defined.</p>
  
  <pre><code>&lt;Popup x:Class="EMS.Controls.Dictionary.MapTip"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
      PopupAnimation="Slide"
       AllowsTransparency="True" Placement="Mouse"       
         x:Name="root"                   
        &gt;
  
      &lt;Popup.Resources&gt;
          &lt;ResourceDictionary&gt;
              &lt;ResourceDictionary.MergedDictionaries&gt;
                  &lt;ResourceDictionary Source="../Resources/Styles.xaml"/&gt;
              &lt;/ResourceDictionary.MergedDictionaries&gt;
          &lt;/ResourceDictionary&gt;
      &lt;/Popup.Resources&gt;
      &lt;Viewbox x:Name="viewBox" IsHitTestVisible="True"&gt;
          &lt;Grid Background="Transparent" Name="mainGrid"&gt;
  
          &lt;/Grid&gt;
      &lt;/Viewbox&gt;
  &lt;/Popup&gt;
  </code></pre>
  
  <p>If I walk up the visual tree using VisualTreeHelper.GetParent from "mainGrid", I eventually get System.Windows.Controls.Primitives.PopupRoot, but never get the Popup itself.  Anyone with a theory on why this is and what I can do about it?  I neeed Popup and not PopupRoot.</p>
  
  <p>TIA.</p>