Introduction
Layout is the process of element placement, and how their size and position changes in response to user interactions (such as a window resize). WPF offers a bunch of layout panels that provide different ways to lay out elements. By combining those panels in various ways, complex and adaptive layouts can be created.
The layout process
Layout is a two-step process. First, the layout container asks each of its children for its desired size. In the second step, it uses whatever logic is applicable to determine at what position and what size each child element should be – and places each child in that rectangular area. A more detailed look at this process can be found in the Creating a custom panel recipe in Chapter 10, Custom Elements.
Each element indicates to its parent its requirements. The following diagram summarizes the most important properties related to these requirements:
Here's a quick breakdown of these important properties:
Width
/Height
: The width and height of the element...