TabPage.UseVisualStyleBackColor Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a value indicating whether the TabPage background renders using the current visual style when visual styles are enabled.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in

public bool UseVisualStyleBackColor { get; set; }
/** @property */
public boolean get_UseVisualStyleBackColor ()

/** @property */
public void set_UseVisualStyleBackColor (boolean value)

public function get UseVisualStyleBackColor () : boolean

public function set UseVisualStyleBackColor (value : boolean)

Property Value

true to render the background using the current visual style; otherwise, false. The default is false.

The TabPage background uses the current visual style only when the UseVisualStyleBackColor and Application.RenderWithVisualStyles property values are both true.

When the UseVisualStyleBackColor and Application.RenderWithVisualStyles property values are both true and the Appearance property of the parent TabControl is Normal, the default value of the BackColor property is Transparent. Child controls that you place on the TabPage inherit the BackColor value by default, so this behavior causes the background of the child controls to render with the current visual style.

Changing the value of the BackColor property automatically sets the UseVisualStyleBackColor property to false. If you want the TabPage background to render using visual styles but you want the child controls to inherit a BackColor value that you specify, set the UseVisualStyleBackColor property after you set the BackColor property.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions