title: Canvas has no parent if not part of the visual tree?
body: <p>I'm writing an app for Windows 8 Metro and am having a problem understanding how Canvas' child-parent relationship works. It seems that when I add one canvas to the children of another, the subcanvas' ->parent property is equal to null until the parent canvas is added to the visual tree. Below is some sample code showing the problem. </p>
  
  <pre><code>Xaml::Controls::Canvas^ testCanvas = ref new Xaml::Controls::Canvas();
  Xaml::Controls::Canvas^ childCanvas = ref new Xaml::Controls::Canvas();
  testCanvas-&gt;Children-&gt;Append(childCanvas);
  
  int size = testCanvas-&gt;Children-&gt;Size; // size will be equal to 1
  if(!childCanvas-&gt;Parent)
  {
  // this code is executed because -&gt;Parent is null. Why is parent here null??
  }
  aCanvasThatIsPartOfTheVisualTree-&gt;Children-&gt;Append(testCanvas);
  if(!childCanvas-&gt;Parent)
  {
  // this code does not get executed because -&gt;Parent is not null, now that testCanvas is part of the visual tree.
  }
  </code></pre>
  
  <p>I've also tried using the VisualTreeHelper to get the parent:</p>
  
  <pre><code>Xaml::Controls::Canvas^ theParent = (Xaml::Controls::Canvas^)VisualTreeHelper::GetParent(childCanvas);
  </code></pre>
  
  <p>and the behavour remains: theParent is null before testCanvas is added to the visual tree, and not null after testCanvas is added to the visual tree.</p>
  
  <p>If this is not a bug, can someone please tell me how to get a subcanvas' parent without the parent being part of the visual tree? If it is a bug, are there any known workarounds? Thank you!</p>