Panel::Background Property

 

Gets or sets a Brush that is used to fill the area between the borders of a Panel.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public:
property Brush^ Background {
	Brush^ get();
	void set(Brush^ value);
}

Property Value

Type: System.Windows.Media::Brush^

A Brush. This default value is null.

Panel elements do not receive mouse or stylus events if a Background is not defined. If you need to handle mouse or stylus events but do not want a background for your Panel, use Transparent.

The following example sets the Background of a Grid to a RadialGradientBrush.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: