Can't find what you're looking for?

Contact us or post in our forums and we'll help you find an answer.

Set the ForeColor of an Appointment in C1Schedule

Background:

Although there is a way to set the BackColor of an Appointment by setting its Label and then the BackColor there is no direct way to set the ForeColor of the text that appears on an Appointment.

Steps to Complete:

C1Schedule supports Html formatting in Appointments. In order to set the ForeColor, you  can handle BeforeAppointmentFormat event and do something like this:

private void C1Schedule1_BeforeAppointmentFormat(object sender, C1.Win.C1Schedule.BeforeAppointmentFormatEventArgs e)
{
 if (e.Text.Contains("Training"))
   {
     e.Text = "" + e.Text + "</>";
   }
}
Get the Latest Version of WinForms Edition
Download the Free Trial Now