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.

Exception Condition
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
Available since 1.1
Return to top
Show: