Dock Enumeration

 

Specifies the Dock position of a child element that is inside a DockPanel.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public enum class Dock

Member nameDescription
Bottom

A child element that is positioned at the bottom of the DockPanel.

Left

A child element that is positioned on the left side of the DockPanel.

Right

A child element that is positioned on the right side of the DockPanel.

Top

A child element that is positioned at the top of the DockPanel.

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 in another direction, you must set the LastChildFill property to false and must also set an explicit dock direction on the last child element.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Return to top
Show: