title: how ro remove child objects from a canvas those child objects are added dynamically to the canvas
body: <p>I am dynamically adding a Rectangle object to a canvas <code>DrawImageTest</code> as mentioned below:</p>
  
  <pre><code>System.Windows.Shapes.Rectangle rectToDraw  = ToRectangle(rect);
  DrawImageTest.Children.Add(rectToDraw);
  </code></pre>
  
  <p>Could you please tell me how to remove this <code>rectToDraw</code> rectangle object from <code>Canvas</code> dynamically through code.</p>