Export (0) Print
Expand All

Splitter.Dock Property

Gets or sets which Splitter borders are docked to its parent control and determines how a Splitter is resized with its parent.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public override DockStyle Dock { get; set; }

Property Value

Type: System.Windows.Forms.DockStyle
One of the DockStyle values. The default is Left.

ExceptionCondition
ArgumentException

Dock is not set to one of the valid DockStyle values.

Use the Dock property to define how a control is automatically resized as its parent control is resized. You can only set the Dock property to Top, Bottom, Left, or Right. The Splitter control enables the user to resize the docked control that is immediately before it in the docking order. Therefore, to enable the user to resize a docked control, dock the control to an edge of a container, and then dock a Splitter control to the same side of that container. For more information, see the example in the Splitter class.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft