Export (0) Print
Expand All

TabPage.UseVisualStyleBackColor Property

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 System.Windows.Forms.dll)

public bool UseVisualStyleBackColor { get; set; }

Property Value

Type: System.Boolean
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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2014 Microsoft