This documentation is archived and is not being maintained.

WindowsFormsHost::Background Property

Gets or sets the hosted control's background as an ambient property. This is a dependency property.

Namespace:  System.Windows.Forms.Integration
Assembly:  WindowsFormsIntegration (in WindowsFormsIntegration.dll)

property Brush^ Background {
	Brush^ get ();
	void set (Brush^ value);
<object Background="Brush"/>

XAML Values


See Brush for XAML Attribute syntax.

Property Value

Type: System.Windows.Media::Brush
A Brush set to the background color.

This dependency property is identified by the BackgroundProperty field. By default, this property is mapped to update the Control::BackColor and Control::BackgroundImage properties of the hosted control.

For more information on mapping the Background property, see Windows Forms and WPF Property Mapping.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0