title: Adding UIElement with AddLogicalChild, AddVisualChild in WPF
body: <p>I created a custom version of canvas by simply extending/inheriting from the Panel.</p>
  
  <p>When I want to draw or render something on it, I simply create a <code>DrawingVisual</code>, draw the desired graphics and call the <code>AddLogicalChild(Visual)</code>, <code>AddVisualChild(Visual)</code> and incrementing the count of the Visuals of the Panel.</p>
  
  <p>This works great when I am adding <code>DrawingVisual</code> instances, but when I try to add a <code>Button</code> here and define the dimensions (<code>MinHeight</code>, <code>MinWidth</code>), it is not displayed.</p>
  
  <p>Is it possible that <code>UIElements</code> need a different logic of handling to be displayed? Basically, how can I add a <code>UIElement</code> to that extended <code>Panel</code> that would be displayed and could be manipulated with?</p>