EditCategory
Layout
EditQuestion
How does layout work?
EditAnswer
Layout is the general principle in which controls are placed and sized in the client area of your application.
Layout is performed in a two-pass recursive process:
Measure and
Arrange.
In the
Measure pass, a parent element asks its children how big they would like to be (their
DesiredSize), considering the size that is available to them. The parent does so by calling the child's
Measure.
In the
Arrange pass, a parent element tells its children what their final size is (their
ActualSize), by calling the child's
Arrange.
The custom measuring and placement intelligence is implemented in the
MeasureOverride and
ArrangeOverride methods of each control.