Border.Padding Border.Padding Border.Padding Border.Padding Property

定義

Thickness とその子要素間の間隔を記述する Border 値を取得または設定します。Gets or sets a Thickness value that describes the amount of space between a Border and its child element.

public:
 property System::Windows::Thickness Padding { System::Windows::Thickness get(); void set(System::Windows::Thickness value); };
public System.Windows.Thickness Padding { get; set; }
member this.Padding : System.Windows.Thickness with get, set
Public Property Padding As Thickness

プロパティ値

Thickness とその子要素の間の間隔を記述する BorderThe Thickness that describes the amount of space between a Border and its single child element. このプロパティには既定値はありません。This property has no default value.

次の例では、このプロパティの値を設定する方法を示します。The following example shows how to set the value of this property.

myBorder1 = new Border();
myBorder1.BorderBrush = Brushes.SlateBlue;
myBorder1.BorderThickness = new Thickness(5, 10, 15, 20);
myBorder1.Background = Brushes.AliceBlue;
myBorder1.Padding = new Thickness(5);
myBorder1.CornerRadius = new CornerRadius(15);
Dim myBorder1 As New Border()
myBorder1.BorderBrush = Brushes.SlateBlue
myBorder1.BorderThickness = New Thickness(5, 10, 15, 20)
myBorder1.Background = Brushes.AliceBlue
myBorder1.Padding = New Thickness(5)
myBorder1.CornerRadius = New CornerRadius(15)
<Border BorderBrush="SlateBlue" BorderThickness="5,10,15,20" Background="AliceBlue" Padding="5" CornerRadius="15">

注釈

依存プロパティ情報Dependency Property Information

識別子フィールドです。Identifier field PaddingProperty
メタデータのプロパティを設定するには trueMetadata properties set to true AffectsMeasureAffectsRenderAffectsMeasure, AffectsRender

適用対象