이 설명서는 보관되지만 유지 되지 않습니다.

Control.Padding 속성

Gets or sets the padding inside a control.

네임스페이스: System.Windows.Controls
어셈블리: PresentationFramework(presentationframework.dll)
XML 네임스페이스:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
public Thickness Padding { get; set; }
/** @property */
public Thickness get_Padding ()

/** @property */
public void set_Padding (Thickness value)

public function get Padding () : Thickness

public function set Padding (value : Thickness)

<object>
  <object.Padding>
    <Thickness .../>
  </object.Padding>
</object>
<object Padding="Thickness" .../>

속성 값

A Thickness. The default value is zero (0).

Padding is the amount of space to insert between the object and its Margin or Border. Padding is specified in the order Left, Top, Right, and Bottom. For more information, see Thickness.

The following example shows how to set the padding property of a control.

<Button Name="btn11" Padding = "5" 
        Click="ChangePadding" TabIndex="1">
  Padding
</Button>

if (btn11.Padding.Left == 5.0)
{
    btn11.Padding = new Thickness(2.0);
    btn11.Content = "Padding";

}
else
{
    btn11.Padding = new Thickness(5.0);
    btn11.Content = "Control Padding changes from 5 to 2.";
}

Microsoft .NET Framework 3.0은 Windows Vista, Microsoft Windows XP SP2 및 Windows Server 2003 SP1에서 지원됩니다.

.NET Framework

3.0에서 지원
표시: