I donβt have the actual code for you, but you probably want to subclass ChildWindow and handle MouseLeftButtonDown, MouseMove, and MouseLeftButtonUp mouse events within a specific border with a ChildWindow edge or within a specific one (for example, the lower right corner).
You would like to use the standard drag and drop logic to find that drag and drop is being performed to resize and update this.Width and this.Height based on relative mouse coordinates using the GetPosition() method of the MouseEventArgs class.
You can also watch the FloatableWindow control on CodePlex, which is a refactored version of ChildWindow that supports drag and drop, move and resize.
source share