In C # 's WinForm program, There are times when you need to use SplitContainer in. NET to manage a wide variety of controls, but. NET provides a less elegant control, and then employs a devexpress Splitcontainercontrol control.
But sometimes do not want to splitcontainercontrol splitter can move, looking for a long time, did not find Splitcontainercontrol there is a property can be disable off this move, Someone on the web found a less-than-perfect solution: To specify the minisize of the two panel of Splitcontainercontrol in the WinForm load function, the code reads as follows:
private void Form1_Load (object sender, EventArgs e) {//purpose is not to let the splitter move this.splitContainerControl1.Panel1.MinSize = This.splitContainerControl1.Panel1.Height; This.splitContainerControl1.Panel2.MinSize = This.splitContainerControl1.Panel2.Height; This.splitContainerControl2.Panel1.MinSize = This.splitContainerControl2.Panel1.Height; This.splitContainerControl2.Panel2.MinSize = This.splitContainerControl2.Panel2.Height; }
However, Splitter can still move a little bit ...
So, in order to be beautiful and "can't move", still adopt devexpress Layoutcontrol control.
Reference (http://www.devexpress.com/Support/Center/p/DQ2576.aspx)