System.Windows.Forms.MonthCalendar.BackColor Property

Gets or sets the background color for the control.

Syntax

public override System.Drawing.Color BackColor { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The Control.BackColor property does not support transparent colors unless the SupportsTransparentBackColor value of System.Windows.Forms.ControlStyles is set to true.

The Control.BackColor property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a System.Windows.Forms.Button will have the same Control.BackColor as its parent System.Windows.Forms.Form by default. For more information about ambient properties, see the System.Windows.Forms.AmbientProperties class or the System.Windows.Forms.Control class overview.

Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the Enable XP visual styles check box. To disable visual styles in C#, open Program.cs and comment out Application.EnableVisualStyles();. For more information about visual styles, see How to: Enable Windows XP Visual Styles.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0