Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
This sample demonstrates using a FlowLayoutPanel control to implement a layout that arranges its controls horizontally or vertically. Setting the Size property appropriately is the only action required to change the orientation of the layout.
For information about using the samples, see the following topics:
![]() |
---|
This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended. |
Demonstrates how to use a FlowLayoutPanel control to create a layout that is oriented horizontally or vertically.
At the command prompt, navigate to the location where you saved the uncompressed sample files.
Navigate to one of the language-specific subdirectories under the SimpleFlowLayout directory.
Type msbuild to build the sample using the solution (.sln) file provided.
Type cd SimpleFlowLayout\bin\Debug to navigate to the location of the executable file.
Type SimpleFlowLayout.exe to run the sample.
In Windows Explorer, navigate to the location where you saved the uncompressed sample files.
Navigate to one of the language-specific subdirectories under the SimpleFlowLayout directory.
Double-click the solution (.sln) file to open it in Visual Studio.
In Visual Studio, press F5 to build and run the sample.
In the Orientation field, click the Vertical RadioButton control to see controls arranged vertically.
– or –
Click the Horizontal RadioButton control to see controls arranged horizontally.
Using a FlowLayoutPanel control to create a layout that is oriented horizontally or vertically.
How to: Design a Windows Forms Layout that Responds Well to Localization