dotnetmonitor.com

 
Index
Previous
Next

 

Dock and anchor concepts apply to the default layout used for Forms. Simply put, anchor maintains the distance between the edge of the control and the corresponding edge of the container in which it is anchored. By default, controls are anchored top left this is what keeps them in the same place when a form is resized. Ill leave anchor=none as an exercise in mind expansion for the ready. Dock and anchor are closely related in fact dock is a subset of the anchor where the distance from the corresponding anchored sides are zero.

Dock -> Anchor Mapping

Dock

Anchor

None

None

Top

Top, Left, Right

Bottom

Bottom, Left, Right

Left

Top, Bottom, Left

Right

Top, Bottom, Right

Fill

Top, Bottom, Left, Right

Terms
What happens when I have Dock and Anchors that conflict?
Dock Scenarios
Padding Margin
You have a perf problem with Layout - how to diagnose?