3

This is something I have noticed over the years but never bothered with it before. When opening WinForms forms in designer view, VS sets some forms to an unsaved state immediately. This only happens with some forms with a slightly complex hierarchy.

The trouble is, whenever this happens, something about the form has been changed (mostly sutble changes). Usually the alignment of a nested control with anchor properties set. In this particular case, I have SplitPanel with a nested GroupBox with a nested PropertyGrid control.

So every time I run the open the form and save it, this annoying change appears in runtime and can be seen in the designer as well. Have others noticed similar behavior? If so, anyone find a cause and workaround?

Raheel Khan
  • 14,205
  • 13
  • 80
  • 168
  • A workaround would be manually setting the property to the correct value just after `InitializeComponent` but there must be a reason for this to happen. – C.Evenhuis Jan 27 '13 at 18:18
  • I already resort to that but with complicated forms, there are too many factors to code for. They are normally distributed between multiple resize events. – Raheel Khan Jan 27 '13 at 18:43

0 Answers0