I have flow layout panel dock (Fill) in parent container. The Parent container DockStyle is set to Top. Also I set the FlowDirection property to LeftToRight for flow layout panel and the AutoSize property to True for both containers. The main function of flow layout panel is to keep dynamically added buttons.
The Code for creating Buttons
Button productButton = new Button();
productButton.AutoSize = true;
productButton.AutoEllipsis = false;
productButtonPanel.Controls.Add(productButton);
There is enough space to keep 10-12 buttons in one line and the FlowLayoutPanel is doing great. It keeps all new buttons in one line. The problem is that the FlowLayoutPanel resizes (vertically) every time I add new Button even when the extra space ("New button line") is not necessary.