This documentation is archived and is not being maintained.
Gets or sets the padding inside a control.
XMLNS for XAML:
member Padding : Thickness with get, set
< object >
< object.Padding >
< Thickness ... />
</ object.Padding >
</ object >
< object Padding = " Thickness " ... />
Padding is specified in the order Left, Top, Right, and Bottom. For more information, see
and Thickness . Alignment, Margins, and Padding Overview
This property only affects a control whose template uses the
property as a parameter. On other controls, this property has no impact. Padding
The following example shows how to set the padding property of a control.
< Button Name = " btn11 " Padding = " 5 "
Click = " ChangePadding " TabIndex = " 1 " >
</ Button >
No code example is currently available or this language may not be supported.
Supported in: 4, 3.5, 3.0
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see
.NET Framework System Requirements.