I have a borderless WPF main window. I\'m trying to make it so that the end user can drag the window.
I\'ve added the following to the Window\'s constructor:
you can override the original method:
public new void DragMove() { if (this.WindowState == WindowState.Normal) { SendMessage(hs.Handle, WM_SYSCOMMAND, (IntPtr)0xf012, IntPtr.Zero); SendMessage(hs.Handle, WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero); } }