Control::Padding Property
.NET Framework (current version)
Gets or sets padding within the control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
For containers such as GroupBox and TabControl, the Padding property gets or sets their respective DisplayRectangle properties. The ScrollableControl::DockPadding property is equal to its Control::Padding property.
Controls receive default values for Padding that are reasonably close to Windows user interface guidelines. Some adjustments might still be necessary for particular applications.
All controls that implement GetPreferredSize are enlarged by the amount in Padding when AutoSize is true.
The following controls do not use Padding:
Controls that do not implement AutoSize through GetPreferredSize
Custom controls that directly inherit from Control
.NET Framework
Available since 2.0
Available since 2.0
Show: