I am having an issue with button controls moving when I close my form in the editor in VS 2012. I am working in C# exclusively. This is diving me nuts as I have to repositio
This happens often if you have a base form (or user control) where you set some anchors for the controls and in derived designer your form has a different size.
A possible solution is to forget anchoring and to use docking instead. You can achieve everything by using the Dock
, Margin
and Padding
properties; however, it can be strange for the first time that you might need to use many invisible panels (for example when you want to use two lines of controls below each other). This is a similar approach as using Stack/Dock panels in WPF.
Additionally, you can play with the TableLayoutPanel
as well.