Content Model: Canvas enforces a strong content model for child content. See the Children property for more information about the Panel content model.
Canvas is the only panel element that has no inherent layout characteristics. A Canvas has default Height and Width properties of zero, unless it is the child of an element that automatically sizes its child elements. Child elements of a Canvas are never resized, they are just positioned at their designated coordinates. This provides flexibility for situations in which inherent sizing constraints or alignment are not needed or wanted. For cases in which you want child content to be automatically resized and aligned, it is usually best to use a Grid element.
The ZIndex property determines the order in which child elements that share the same coordinate space appear. A higher ZIndex value for one child element indicates that this element will appear above another child element that has a lower value.
If you specify them, the attached properties Top or Left take priority over the Bottom or Right properties.
Child elements of a Canvas are always given the full size that they desire. As a result, vertical alignment and horizontal alignment have no effect inside a Canvas.
Canvas is a top-level layout control that you can use for absolute positioning of child content. For painting and drawing, you use Brushes and do not have to use a Canvas. For more information, see Painting with Solid Colors and Gradients Overview.
By default, panel elements do not receive focus. To compel a panel element to receive focus, set the Focusable property to true.