This is what my setup looks like:

This is a DockPanel package. The white area is the visual component of dockPanel, which I fell in shape. I don't need docking, nested docking, drop tabs, etc. I just need the ProjectsForm panel and you want it to automatically hide and hide when clicked by the user.
So my questions are: how can I convert the previous picture to look like this:

How can I prevent this panel from floating?
Here is the code:
private void MainForm_Load(object sender, EventArgs e)
{
DockContent dockProjectsContent = new ProjectsForm();
dockProjectsContent.AllowDrop = false;
dockProjectsContent.AllowEndUserDocking = false;
dockProjectsContent.ShowHint = DockState.DockLeft;
dockProjectsContent.Show(dockProjects);
}
kseen source
share