Try Microsoft Edge A fast and secure browser that's designed for Windows 10 No thanks Get started
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the Brush that fills the background of the border.
public Brush Background { get; set; }
<Border> <Border.Background> singleBrush </Border.Background> </Border>
<Border Background="colorString"/>
Within opening and closing property elements for Border.Background, exactly one object element for an object that derives from Brush. This is typically one of the following classes: LinearGradientBrush, RadialGradientBrush, ImageBrush, SolidColorBrush, VideoBrush.
The Color for a SolidColorBrush expressed as an attribute string. This can be a named color, an RGB value, or an ScRGB value. RGB or ScRGB may also specify alpha information. See the XAML Values section in Color.
Dependency property identifier field: BackgroundProperty
The following example shows how to set the background of a Border.
<Border Background="Cyan" CornerRadius="20" Grid.Column="2" Grid.Row="2"> <TextBlock Text="Background Brush" TextWrapping="Wrap" VerticalAlignment="Center" /> </Border>
Windows Phone