共用方式為


Border.BorderThickness 屬性

定義

取得或設定 Border 的相對 Thickness

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

屬性值

Thickness,描述 Border 邊界的寬度。 此屬性沒有預設值。

範例

下列範例示範如何設定這個屬性的值。

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">

備註

相依性屬性資訊

識別碼欄位 BorderThicknessProperty
中繼資料屬性設定為 true AffectsMeasure, AffectsRender

適用於