Click here to Skip to main content
Click here to Skip to main content

Docking control with tear-away frame tool windows

, 6 Jul 2003
Rate this:
Please Sign up or sign in to vote.
A container control that tears away into a tool window when dragged


Well, never being one to be easily satisfied, I was quite happy to find Phil Wright's excellent article on docking controls. However, I of course wanted more. I wanted a control that would behave like a container in the design environment, and would allow me to tear it away from the sides of its container and drop it wherever I wanted it.

So, using Phil's work as a base (thanks, Phil!) I extended his control to give it a little more design flexibility and a way to move it around more like a Visual Studio tool window.

Using the control is simple. Just copy the .cs and .resx files into your project directory and include them in the project itself. You'll either have to add an Images directory to your project for the tool's icon or change the [ToolboxBitmap ....] line in the .cs file to point to an image you want to use. Then, use it like any other control.

Known issues with this version:

  1. No location serialization - the control does not remember where it was placed between iterations.
  2. Control does not always size correctly when dragged and docked to an edge.
  3. Does not always play nicely with the design environment - I've had it lose child controls, somewhat intermittently.

Anyhow, it needs a little work (I'll try to keep new versions posted), but it's enough to get you started. Enjoy!


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author


United States United States
No Biography provided

Comments and Discussions

GeneralRe: Cant MagicDocking do this already? Pinmemberleppie8-Jul-03 8:47 
GeneralRe: Cant MagicDocking do this already? Pinmemberfadi8-Jul-03 10:29 
GeneralRe: Cant MagicDocking do this already? PinmemberDiego Mijelshon22-Jul-03 18:45 
GeneralRe: Cant MagicDocking do this already? PinmemberTim Dawson8-Jul-03 23:39 
GeneralRe: Cant MagicDocking do this already? PinmemberSoliant8-Jul-03 5:24 
GeneralRe: Cant MagicDocking do this already? Pinmemberlee_connell8-Jul-03 18:31 
GeneralRe: Cant MagicDocking do this already? Pinmemberstefanos330-Nov-03 21:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150305.1 | Last Updated 7 Jul 2003
Article Copyright 2003 by Iridar
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid