WindowsFormsHost.Background 屬性

定義

取得或設定裝載控制項的背景以作為環境屬性。

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

屬性值

設定為背景色彩的 Brush

備註

此相依性屬性是由 BackgroundProperty 欄位識別。 根據預設,這個屬性會對應至更新 Control.BackColor 裝載控制項的 和 Control.BackgroundImage 屬性。

如需屬性對應 Background 的詳細資訊,請參閱Windows Forms 和 WPF 屬性對應

XAML Attribute Usage

<object Background="Brush"/>

XAML 值

如需 XAML 屬性語法,請參閱 Brush

相依性屬性資訊

識別碼欄位 BackgroundProperty
設定為 的中繼資料屬性 true AffectsRender, SubPropertiesDoNotAffectRender

適用於

另請參閱