Control.BorderBrush Property
.NET Framework 4.6 and 4.5
Gets or sets a brush that describes the border background of a control.
Namespace:
System.Windows.Controls Assembly:
PresentationFramework (in PresentationFramework.dll)
[BindableAttribute(true)]
public Brush BorderBrush { get; set; }
This property only affects a control whose template uses the BorderBrush property as a parameter. On other controls, this property has no impact.
The following example shows how to set the border brush property of a control.
<Button Name="btn6" BorderBrush="Red"
Click="ChangeBorderBrush">
BorderBrush
</Button>
void ChangeBorderBrush(object sender, RoutedEventArgs e)
{
if (btn6.BorderBrush == Brushes.Red)
{
btn6.BorderBrush = Brushes.Black;
btn6.Content = "Control border brush changes from red to black.";
}
else
{
btn6.BorderBrush = Brushes.Red;
btn6.Content = "BorderBrush";
}
}
.NET Framework
Supported in: 4.6, 4.5, 4, 3.5, 3.0
.NET Framework Client Profile
Supported in: 4, 3.5 SP1