BackgroundColor Property

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Specifies the background color of the rectangular region that display XAML content.

HTML
<OBJECT/EMBED BackgroundColor="colorValue" .../>
Scripting

colorValue = wpfeObject.backgroundColor

wpfeObject.backgroundColor = colorValue

Property Value

colorValue

Specifies the background color value as a string, which can either be a named color value, or an 8-bit or 16-bit color value, with or without alpha transparency:

Type Example Description
Color Name "Teal" A named color value. For a listing of color names, see the Remarks section in Color.
8 Bit RGB "#RGB" An 8-bit RGB value.
8 Bit RGB + Alpha "#ARGB" An 8-bit RGB value with alpha transparency.
16 Bit RGB "#RRGGBB" A 16-bit RGB value. For a listing of hexadecimal equivalents for color names, see the Remarks section in Color.
16 Bit RGB + Alpha "#AARRGGBB" A 16-bit RGB value with alpha transparency. For a listing of hexadecimal equivalents for color names, see the Remarks section in Color.

This property is read/write. The default value is null, which is equivalent to the color white.

Remarks

If the WindowlessMode property is set to true, the BackgroundColor property value can specify an alpha value for the color. The color value is then blended with the HTML page.

Here is the effect of setting the BackgroundColor property value to "#04008080" for two WPF/E controls on a page--the first, has WindowlessMode set to true; the second is set to false. The background for the first WPF/E control is blended with the pattern of the HTML page. The background for the second WPF/E control is opaque.


WindowlessMode property set on two WPF/E controls

Applies To

WPF/E Control

See Also

Using a WPF/E Control, Color, WindowlessMode