Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
490
Appointment colors.
posted

Hello, I am trying to do something similar to Outlook's Category feature, so I want to change the back color of an appointment.

Is there an event that fires before an appointment is painted, or do I need to loop through the collection?

Any help is much appreciated.

  • 490
    Verified Answer
    posted

    Thank you.

    The event I was looking for was UltraCalendarInfo.AppointmentDataInitialized.

    Then I used e.Appointment.Appearance.BackColor.

  • 69832
    Offline posted

    The WinSchedule controls implement the IUIElementDrawFilter interface, which allows you to "owner draw" any aspect of the control you like, but that should not be necessary - the Appointment object exposes an Appearance property (which in turn exposes a BackColor property), so you just have to set that property to change the color. You can iterate the collection and do that, although I recommend using the same Appearance object for the ones that belong to the same category (as opposed to creating a different instance for each Appointment).