Border.BorderBrush Border.BorderBrush Border.BorderBrush Border.BorderBrush Property

Definition

Gets or sets the Brush that is applied to the edge area of the Border.

public : Brush BorderBrush { get; set; }
Brush BorderBrush();

void BorderBrush(Brush borderbrush);
public Brush BorderBrush { get; set; }
Public ReadWrite Property BorderBrush As Brush
<Border BorderBrush="{StaticResource resourceName}"/>

Property Value

The brush that fills the border. The default is null, (a null brush) which is evaluated as Transparent for rendering.

Examples

This example shows how to set the BorderBrush value to a solid color using an inline-defined attribute value "Blue". The XAML parser uses this "Blue" value to refer to the named color Colors.Blue, and to create the SolidColorBrush instance that supplies the runtime value.

<Border BorderThickness="5" BorderBrush="Blue" >
    <StackPanel Grid.Column="0" Grid.Row="0">
        <TextBlock Text="One"/>
        <TextBlock Text="Two"/>
        <TextBlock Text="Three"/>
    </StackPanel>
</Border>

Remarks

The BorderThickness value must be greater than 0 in order to see the BorderBrush value take effect.

See also