This worked for me on a similar situation:
splitContainer1.Panel2Collapsed = true;
splitContainer1.Panel2.Hide();
I wanted the second panel to not be visible at all in some cases, so I implemented it this way.
This worked for me on a similar situation:
splitContainer1.Panel2Collapsed = true;
splitContainer1.Panel2.Hide();
I wanted the second panel to not be visible at all in some cases, so I implemented it this way.