Content Model: DockPanel enforces a strong content model for child content. See the Children property for more information about the Panel content model.
The SetDock method changes the position of an element relative to other elements within the same container. Alignment properties, such as HorizontalAlignment, change the position of an element relative to its parent element.
If you set the LastChildFill property to true, which is the default setting, the last child element of a DockPanel always fills the remaining space, regardless of any other dock value that you set on the last child element. To dock a child element in another direction, you must set the LastChildFill property to false and must also specify an explicit dock direction for the last child element.
Panel elements do not receive focus by default. To compel a panel element to receive focus, set the Focusable property to true.
Note: The position of child elements of a DockPanel on the screen is determined by the Dock property of the respective child elements and the relative order of those child elements under the DockPanel. Therefore, a set of child elements with the same Dock property values can be positioned differently on the screen depending on the order of these children under the DockPanel. Child ordering effects positioning because the DockPanel iterates through its child elements in order, setting the position of each element depending on remaining space.