I'm working on a .NET 3.5 desktop application written in C#. It's complex UI is populated dynamically. One part of it is the following group box which is contained in a FlowLayoutPanel and the FlowLayoutPanel is contained in a UserControl. The screenshot is taken from the design view:
When I launch the application, all controls get stretched:
Even I'm fixing the widths of each UserControl's size when Load
event of the UserControl is called. The AutoSize
property of all of the controls inside the group box is false.
Why is this happening and how to prevent this? I want the UI look exactly like the design view.
EDIT
The best answer to this question didn't solve my problem. Firstly, setting the border style to FixedX
creates an undesirable border. Secondly, the inner controls still expanded and they are clipped by the border.