This is used by Control objects to suggest to
layout managers how they should be treated. The default layout
manager first looks at Control.Dock on each
contained object to see if it should be locked to one edge or another
(see DockStyle). If it is not docked, it then
examines the Control.Anchor property.
If a Control is anchored to a particular edge, it
means that the side nearest to that edge will be maintained at a
fixed distance from it. You can anchor to more than one edge,
allowing you to create controls that move or resize as their
container is resized.
You can replace the default layout management by overriding the
OnLayout() method. You might do this in
conjunction with a
System.ComponentModel.IExtenderProvider that adds
additional properties to the contained Control
objects to help manage the new layout mechanism.
public enum AnchorStyles {
None = 0x00000000,
Top = 0x00000001,
Bottom = 0x00000002,
Left = 0x00000004,
Right = 0x00000008
}