Border.Background Border.Background Border.Background Border.Background Property

Definición

Obtiene o establece Brush que rellena el área entre los límites de Border.Gets or sets the Brush that fills the area between the bounds of a Border.

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

Valor de propiedad

Brush que dibuja el fondo.The Brush that draws the background. Esta propiedad no tiene ningún valor predeterminado.This property has no default value.

Ejemplos

El ejemplo siguiente muestra cómo establecer el valor de la Background propiedad mediante el uso de Lenguaje XAML (Extensible Application Markup Language)Extensible Application Markup Language (XAML) y el código.The following example shows how to set the value of the Background property by using Lenguaje XAML (Extensible Application Markup Language)Extensible Application Markup Language (XAML) and code.

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

Comentarios

Información sobre propiedades de dependenciaDependency Property Information

Campo de identificadorIdentifier field BackgroundProperty
Establecen las propiedades de metadatos en trueMetadata properties set to true AffectsRender, SubPropertiesDoNotAffectRenderAffectsRender, SubPropertiesDoNotAffectRender

Se aplica a