This appendix summarizes controls that are designed to arrange and contain other controls. They help you position the controls that make up the user interface.
The following sections very briefly summarize these controls. They list the controls' most important properties and provide simple XAML examples. For more detail, see Chapter 6.
Many of the controls define attached properties for use by child controls to tell the layout control how to position the children. Tables in this appendix summarize the key attached properties.
Because these controls are designed to hold other controls, they make logical places to define styles. For example, to make all of the
Labels inside a
Grid use the same font styles, you can add an unnamed
Label style to the
Grid's Resources section.
Canvas is a very simple layout control that lets you arrange its contents by explicitly setting the distances between their edges and those of the
Canvas. See Table C-1 for the key properties.
Table C.1. Key Properties of Canvas
The color used to fill the control's interior
Determines whether the control clips its children to its boundaries.
A child control can use attached properties to tell the
Canvas how to position the child. The key attached properties for
Canvas are given in Table C-2.
Table C.2. Key Attached Properties of Canvas
Sets the distance between the child's bottom edge and the