title: Drawing hierarchically Rectangle on WPF Canvas
body: <p>I'm trying to place <code>rectangles</code> like in the next picture</p>
  
  <p><img src="https://i.stack.imgur.com/26g61.png" alt="enter image description here"></p>
  
  <p>The blue arrows shows the <code>parent-element</code> from the <code>child</code>.</p>
  
  <p>I got a class named <code>Box</code> with a parent propertie to a Box. 
  All the created Boxes I push into an <code>ObservableCollection</code> for my bindings in the XAML code. </p>
  
  <p>Here is the Box class:</p>
  
  <pre><code>public class Box
  {
      public string Content { get; set; } //Content in the Box
      public double X { get; set; }       //For Canvas.Left propertie
      public double Y { get; set; }       //For Canvas.Right propertie
      public double Width { get; set; }
      public double Height { get; set; }
      public Box Parent { get; set; }
  }
  </code></pre>
  
  <p>But now I dont get a correct way to draw the rectangles on a canvas like in the picture. I got the idea to create a grid with different column amount but I'm not shure if this is possible.</p>
  
  <p>Best regards.</p>