Dock Enum

Definition

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

public enum Dock
Inheritance

Fields

Name Value Description
Left 0

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

Top 1

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

Right 2

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

Bottom 3

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

Remarks

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

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also