Export (0) Print
Expand All

Control.BorderBrush Property

Gets or sets a brush that describes the border background of a control. This is a  dependency property.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

'Declaration
<BindableAttribute(True)> _
Public Property BorderBrush As Brush
'Usage
Dim instance As Control
Dim value As Brush

value = instance.BorderBrush

instance.BorderBrush = value
/** @property */
public Brush get_BorderBrush ()

/** @property */
public void set_BorderBrush (Brush value)

public function get BorderBrush () : Brush

public function set BorderBrush (value : Brush)

For XAML information, see the Brush type.

Property Value

The brush that is used to fill the control's border; the default value is Transparent.

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

<Button Name="btn6" BorderBrush="Red" 
        Click="ChangeBorderBrush">
  BorderBrush
</Button>

Sub ChangeBorderBrush(ByVal Sender As Object, ByVal e As RoutedEventArgs)

    If (Equals(btn6.BorderBrush, Brushes.Red)) Then

        btn6.BorderBrush = Brushes.Black
        btn6.Content = "Control border brush changes from red to black."

    Else

        btn6.BorderBrush = Brushes.Red
        btn6.Content = "BorderBrush"
    End If
End Sub

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft