How to change time color in a appointment

3 posts, 0 answers
  1. Peter
    Peter avatar
    6 posts
    Member since:
    Nov 2015

    Posted 11 Dec 2015 Link to this post

    Hi.

    How do i change the "time" color in a appointment? I have figured out to change everything else, but not this. See attached file.

  2. Peter
    Peter avatar
    6 posts
    Member since:
    Nov 2015

    Posted 11 Dec 2015 in reply to Peter Link to this post

    PS. In visual basic code, please :-)
  3. Dess
    Admin
    Dess avatar
    1678 posts

    Posted 11 Dec 2015 Link to this post

    Hello Peter,

    Thank you for writing.
     
    RadScheduler uses the HTML-like Text Formatting functionality and the time part is formatted to be displayed with gray color. In order to customize it, you can use the following approach:
    Sub New()
        InitializeComponent()
         
        Me.RadScheduler1.AppointmentTitleFormat = "{2}"
        Dim app As New Appointment(DateTime.Now, TimeSpan.FromHours(3), "Christmas party")
        Me.RadScheduler1.Appointments.Add(app)
    End Sub
     
    Private Sub RadScheduler1_AppointmentFormatting(sender As Object, e As SchedulerAppointmentEventArgs) _
        Handles RadScheduler1.AppointmentFormatting
        e.AppointmentElement.ForeColor = Color.Fuchsia
        e.AppointmentElement.Text = e.Appointment.Summary & " " & String.Format("{0:hh:mm:tt}", e.Appointment.Start) + " - " _
        & String.Format("{0:hh:mm:tt}", e.Appointment.End)
    End Sub

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top