title: Force a custom WPF Control to resize correctly
body: <p>I have written a WPF user control and part of it involves dynamically adding elements to a canvas which effects the height of said canvas. The canvas is nested within a grid. When I dynamically add my elements the height of the canvas changes, but the canvas ends up extending beyond the edge of the overall control rather than causing the control to resize and make itself taller. 
  How can I force the control to resize correctly? 
  I get the feeling I need to either call or override Measure or Arrange but I’m having no luck with either method – possibly because I’m calling them with incorrect parameters or possibly because they aren’t the correct methods to be calling.</p>