共用方式為


Border.BorderBrush 屬性

定義

取得或設定繪製外框色彩的 Brush

public:
 property System::Windows::Media::Brush ^ BorderBrush { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };
public System.Windows.Media.Brush BorderBrush { get; set; }
member this.BorderBrush : System.Windows.Media.Brush with get, set
Public Property BorderBrush As Brush

屬性值

Brush

繪製外框色彩的 Brush。 此屬性沒有預設值。

範例

下列範例示範如何使用 Extensible Application Markup Language (XAML) 和程式碼來設定 屬性的值 BorderBrush

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

備註

相依性屬性資訊

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

適用於