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

定義

Border の境界の間の領域を塗りつぶす Brush を取得または設定します。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

プロパティ値

背景を描画する BrushThe Brush that draws the background. このプロパティには既定値はありません。This property has no default value.

次の例の値を設定する方法を示しています、Backgroundプロパティを使用してExtensible Application Markup Language (XAML)Extensible Application Markup Language (XAML)とコード。The following example shows how to set the value of the Background property by using Extensible Application Markup Language (XAML)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">

注釈

依存プロパティ情報Dependency Property Information

識別子フィールドです。Identifier field BackgroundProperty
メタデータのプロパティを設定するには trueMetadata properties set to true AffectsRenderSubPropertiesDoNotAffectRenderAffectsRender, SubPropertiesDoNotAffectRender

適用対象