Bewerken

Share via


TabPage.BackColor Property

Definition

Gets or sets the background color for the TabPage.

public:
 virtual property System::Drawing::Color BackColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Public Overrides Property BackColor As Color

Property Value

A Color that represents the background color of the TabPage.

Remarks

The default value of the BackColor property is the value of the Control.DefaultBackColor property unless the UseVisualStyleBackColor and Application.RenderWithVisualStyles property values are both true and the Appearance property of the parent TabControl has a value of Normal, in which case 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.

Applies to

See also