title: Force resize of transparent WPF window with custom chrome
body: <p>I have been searching for hours and haven't found anything useful because all other issues are too localized, so here is my version of this (common) problem:</p>
  
  <p>I have a WPF window with <em>WindowStyle=None</em> and <em>ResizeMode=NoResize</em> (otherwise I would get resize borders which I do not want) and most important <em>AllowsTransparency=</em> <strong>False</strong> and I <strong>must</strong> stick to this setup.</p>
  
  <p>Changing the <em>ResizeMode</em> to <em>CanResize</em> and having a custom resize grip with the following MouseDown handler</p>
  
  <pre><code>[DllImport("User32.dll")]
  public static extern bool ReleaseCapture();
  
  [DllImport("User32.dll")]
  public static extern IntPtr SendMessage(
       IntPtr hWnd, UInt32 Msg, Int32 wParam, Int32 lParam);
  
  private void OnResizeGripMouseDown(object sender, MouseButtonEventArgs e) {
      ReleaseCapture();
      SendMessage(Window.Handle, WM_NCLBUTTONDOWN, HTBOTTOMRIGHT, 0);
  }
  </code></pre>
  
  <p>allows me to resize the window perfectly, however there is the resize border left. Is there any way to force the resizability of the window although it has <em>ResizeMode=NoResize</em>?</p>
  
  <p>(Maybe via <code>SetWindowLong</code> and <code>GWL_EXSTYLE</code>? If there is the the need for messages, I already have a <code>WindowProc</code> setup to handle this.)</p>