I made some layout changes for my application in the Visual Studio designer and all of a sudden the automatic resizing of controls acts kinda weird - or at least I'm no experienced enough to figure out why it happens.
This is the case: I have a content panel to which I add content in the form of fixed size UserControl objects at run time. By fixed size I mean that MinimumSize = MaximumSize = Size of these controls. This has worked out fine before, but all of a sudden content is resized (even though its fixed size) in a way that so that it becomes larger than the content container making some of it hidden. I can't figure out what I have done to mak this happen.
Please see the screenshot of a debug session in which the sizing is illustrated in through the watch variables to see what I mean. Note that the ContentForm has Dock = DockStyle.Fill set before being passed to the AddContentForm Sub.
I have been fiddling with the AutoSize, Locked, Dock, Size(s) etc. properties, but nothing seems to solve this very illogical behavior. Does any one have the slightest idea what is causing this?