Olaf Krumnow - 2002-08-13

The main problem in .NET is that controls do not have information about it's possible sizing. You don't know how small or large a control can be and what it's preferred size for optimal display is. Nor do a control contains information about an alignment in relation to it's container.
So you have to provide these informations. This could be done by deriving from all special controls like Button, Label etc and implementing an interface in these derivates. I called this interface ILayoutable as theses controls are now layoutable by a proper container. This interface defines functions for providing min, max and preferred sizes as well as alignment information.

The containers are special controls able to hold other controls. In order to provide the layouting a container must know it's responsible layout manager class. The interface for containers is ILayoutContainer, derived from ILayoutable, as a container has to be layouted too.
The concrete layout is done in the OnLayout method ofthe container control. The container passes the request to the layout manager who is responsible for the layouting.

Third and currently last interface is the ILayoutManager interface for the layout manager classes.