Open In App

C# | FlowLayoutPanel Class

In Windows Forms, FlowLayoutPanel control is used to arrange its child controls in a horizontal or vertical flow direction. Or in other words, FlowLayoutPanel is a container which is used to organize different or same types of controls in it either horizontally or vertically. The FlowLayoutPanel class is used to represent windows flow layout panel and also provide different types of properties, methods, and events. It is defined under System.Windows.Forms namespace. In C#, you can create a FlowLayoutPanel in the windows form by using two different ways:

1. Design-Time: It is the easiest way to create a FlowLayoutPanel control as shown in the following steps:



2. Run-Time: It is a little bit trickier than the above method. In this method, you can create a FlowLayoutPanel programmatically with the help of syntax provided by the FlowLayoutPanel class. The following steps show how to set the create FlowLayoutPanel dynamically:



Article Tags :
C#