Udostępnij za pośrednictwem


Layout in Windows Forms Controls

 

Precise placement of controls on your form is a high priority for many applications. The System.Windows.Forms namespace gives you many layout tools to accomplish this.

In This Section

AutoSize Property Overview
Describes the AutoSize property and its role in layout.

Margin and Padding in Windows Forms Controls
Describes the Margin and Padding properties and their roles in layout.

How to: Align a Control to the Edges of Forms
Demonstrates how to use the Dock property to align your control to the edge of the form it occupies.

How to: Create a Border Around a Windows Forms Control Using Padding
Demonstrates how to use the Padding property to outline a control.

How to: Implement a Custom Layout Engine
Demonstrates how to implement a LayoutEngine for arranging Windows Forms controls.

Reference

TableLayoutPanel
Provides reference documentation for the TableLayoutPanel control.

FlowLayoutPanel
Provides reference documentation for the FlowLayoutPanel control.

See Also

How to: Anchor and Dock Child Controls in a FlowLayoutPanel Control
How to: Anchor and Dock Child Controls in a TableLayoutPanel Control
How to: Design a Windows Forms Layout that Responds Well to Localization
AutoSize Behavior in the TableLayoutPanel Control