Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property Dock As System.Windows.Forms.DockStyle |
| C# | |
|---|
public System.Windows.Forms.DockStyle Dock {get; set;} |
Property Value
One of the
System.Windows.Forms.DockStyle values. The default is
System.Windows.Forms.DockStyle.None.
Exceptions
| Exception | Description |
| System.ComponentModel.InvalidEnumArgumentException | The value assigned is not one of the System.Windows.Forms.DockStyle values. |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also