visual studio 2005 designer moves controls and resizes Form

后端 未结 10 1157
Happy的楠姐
Happy的楠姐 2020-11-29 09:36

When i open a form in visual studio 2005 (c#) the designer automaticaly resize the form and move/resize controls without touching the designer at all. The source file is cha

10条回答
  •  星月不相逢
    2020-11-29 10:09

    This is one you should live with. Even in VS2008 such things happen from time to time. It is mostly depends on form content (controls, positions, etc), and there is no option in VS to disable such behavior.

    When you open your form in designer, vs runtime rebuilds visual appearance from code behind. And sometimes it made changes at this moment. Also when you are simply adding one control to form, designer fully rebuilds codebehind and resource files. This is well known issue, and seems that MS won't fix it, because they move in WPF direction.

    So several points to simplify your life:

    1. Move to VS2008, designer were more consistent, but still shuffle controls in .designer.cs file
    2. Place your code in one of the source repositories, so if you accidentally saved such form, you can restore it from repositary.

提交回复
热议问题