Common Layout Properties
All user interface elements have a standard set of layout
properties, mostly inherited from the FrameworkElement base class. These properties
are shown in Table 3-2. We saw a
few of these in passing in the preceding section, but we will now look
at them all in a little more detail.
Table 3-2. Common layout properties
Property | Usage |
|---|---|
| Specifies a fixed width |
| Specifies a fixed height |
| The minimum permissible width |
| The maximum permissible width |
| The minimum permissible height |
| The maximum permissible height |
| Horizontal position if element is smaller than available space |
| Vertical position if element is smaller than available space |
| Space around outside of element |
| Space between element border and content |
| Allows the element to be made invisible to the layout system where necessary |
| Text direction |
| Controls which elements are on top or underneath |
| Applies a transform without modifying the layout |
| Applies a transform that affects layout |
A couple of these properties are not from FrameworkElement. Padding is defined in several places: Control, Border, and TextBlock each define this property. It has
the same meaning in all cases. It is not quite ubiquitous because
padding is meaningful only on elements that have content. Panel.ZIndex may be applied to any element,
but it's not strictly inherited from FrameworkElement ...