title: Element host doesn't resize child properly
body: <p>I'm hosting a WPF control in WinForms using the elementHost control. When I try to resize the elementHost (in height) any further then the orignal position, the child control inside is centered and black borders appear around it. When I try to modify the child's size to match the host control, it still "centers" it and part of the child is cut off and cant fit.</p>
  
  <p><img src="https://i.stack.imgur.com/przO1.png" alt="My hosted control when the form is resized to be bigger."></p>
  
  <p>Here is my resize code (which is in the form resize event handler):</p>
  
  <pre><code>elementHost1.Height = ClientSize.Height - h;
  elementHost1.Width = ClientSize.Width - w;
  (elementHost1.Child as WPFCodeBox).textEditor.Height = ClientSize.Height - h;
  (elementHost1.Child as WPFCodeBox).textEditor.Width = ClientSize.Width - w;
  (elementHost1.Child as WPFCodeBox).Border.Width = ClientSize.Width - w;
  (elementHost1.Child as WPFCodeBox).Border.Height = ClientSize.Height - h;
  
  Where h is the distance from the bottom of the form to the bottom of the element host
  same for w but in width.
  </code></pre>
  
  <p>Thanks for any help!</p>