If the user of my winforms application resizes the main form, I want the 2 panels to stretch out also, along with the child controls.
How can I achieve this?
If the user of my winforms application resizes the main form, I want the 2 panels to stretch out also, along with the child controls.
How can I achieve this?
Play around with the Dock and Anchor properties of your panels.
You can use the TableLayoutPanel and set column width at x% each this way you will have the screen split in 2. The TableLayoutPanel must be Dock to fill all the form or Anchor.
The TableLayoutPanel can contain other panel. OR you can use simply your panel and use Anchor (click the panel and go in the Properties panel of VS).
If the user of my winforms application resizes the main form, I want the 2 panels to stretch out also, along with the child controls.
You're the ideal use case for TableLayoutPanel (MSDN). If you were only scaling the panels, Dock and Anchor would be appropriate. But since you want your controls to scale well, you're pretty much in an AutoLayout world, and likely the TableLayoutPanel. (I'm a huge fan of this, by the way, although overuse can have a negative performance impact on laying out your controls.)
Some helpful links on using it to configure your layout to scale: