TabPage.UseVisualStyleBackColor Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether the TabPage background renders using the current visual style when visual styles are enabled.
public:
property bool UseVisualStyleBackColor { bool get(); void set(bool value); };
public bool UseVisualStyleBackColor { get; set; }
member this.UseVisualStyleBackColor : bool with get, set
Public Property UseVisualStyleBackColor As Boolean
Property Value
true
to render the background using the current visual style; otherwise, false
. The default is false
.
Remarks
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.
Applies to
See also
.NET