|In addition to the strategies that OriginalGriff told you about, you could use a ContainerControl like a SplitterPanel to create an easy pop-out - pop-back userinterface. Let's say your Buttons were all in Panel1 of the SplitContainer; then you can show/hide it by:
private void button1_Click(object sender, EventArgs e)
splitContainer1.Panel1Collapsed = ! splitContainer1.Panel1Collapsed;
}To get this to work as one might expect:
for the SplitContainer:
0. set appropriate MinimumSize and MaximumSize values.
1. set the 'SplitterDistance property to the width of the left Panel.
2. set IsSplitterFixed property to 'true if you are not going to allow the user to re-size the Panels
for the Panels
1. set the Panel1MinSize and Panel2MinSize (int) properties to appropriate values
If the 'Orientation property of the SplitterPanel is 'Vertical, then the two min size properties are going to set the width of the Panels.
Keep in mind that when the collapsed Panel1 is expanded, the Controls placed in Panel2 are going to move depending on how you set their Anchor/Dock properties.
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008