Keeping SplitContainer SplitterDistance consistent

February 9, 2011.netwinforms

If you're having trouble keeping the SplitterDistance property of a SplitContainer consistent across app sessions, you can set the FixedPanel property of the splitter to FixedPanel.Panel1.

splitter.FixedPanel = FixedPanel.Panel1;

I guess this could also work with FixedPanel.Panel2 as well but I haven't given it a try. Credit this stackoverflow post.