DateTimePicker.CalendarTrailingForeColor DateTimePicker.CalendarTrailingForeColor DateTimePicker.CalendarTrailingForeColor DateTimePicker.CalendarTrailingForeColor Property

定義

取得或設定月曆尾隨日期的前景色彩。Gets or sets the foreground color of the calendar trailing dates.

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

屬性值

Color,表示月曆尾隨日期的前景色彩。A Color that represents the foreground color of the calendar trailing dates.

例外狀況

指派值為 nullThe value assigned is null.

備註

建立時, 這個屬性最初會設定為等於DefaultTrailingForeColor域值。 DateTimePickerWhen a DateTimePicker is created, this property is initially set equal to the DefaultTrailingForeColor field value.

尾端日期是上個月的結束日期, 或下個月中用來填滿行事曆的開始日期。The trailing dates are the ending dates from the previous month or the beginning dates from the next month used to fill the calendar.

從 Windows Vista 開始, 視主題而定, 設定此屬性可能不會變更行事曆的外觀。Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. 例如, 如果 Windows 設定為使用 Aero 主題, 則設定此屬性不會有任何作用。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. 若要在 Visual Basic 中停用視覺化樣式, 請開啟 [專案設計工具], 然後取消選取 [啟用 XP 視覺化樣式] 核取方塊。To disable visual styles in Visual Basic, open the Project Designer and uncheck the Enable XP visual styles check box. 若要在中停C#用視覺化樣式, 請開啟Application.EnableVisualStyles();Program.cs 並將其批註。To disable visual styles in C#, open Program.cs and comment out Application.EnableVisualStyles();.

適用於

另請參閱