title: How to redraw revealed windows on (custom) window resize
body: <p>I have a somewhat strange issue in WPF, where I have created a custom window type (comes with a notification icon and custom chrome, mainly). Under normal circumstances it works fine (e.g. resizing using handles etc). However, when trying to make the window automatically size to content, I've ended up with a situation where it can resize smaller without redrawing the windows behind it.</p>
  
  <p>When the window is moved (via <code>DragMove()</code>), it correctly repaints everything behind it, but until it either moves or is hidden, nothing happens.</p>
  
  <p>Can anyone tell me what messages <code>DragMove()</code> is generating that cause the area that was previously hidden by the window client area to invalidate and repaint correctly? I've tried <code>WM_PAINT</code> pointed at my custom window, but either it does nothing (e.g. windows doesn't expect a <code>WM_PAINT</code> message from me) or it only repaints the current client area, not the previous one.</p>