Hi,
I wanted appointments on the calendar to have multiple colors but I'm not able to create the resource to change the color of the color scheme.
Can someone help me?
Thank you,
Diogo Queirós
Hi Diogo ,
You can easily create ScheduleResources like this:
// Create some resourcesObservableCollection<ScheduleResource> resources = new ObservableCollection<ScheduleResource>();resources.Add(new ScheduleResource("ID1", "Bob Smith") { ColorScheme = ScheduleResourceColorScheme.Chocolate });resources.Add(new ScheduleResource("ID2", "Joe Davis") { ColorScheme = ScheduleResourceColorScheme.Fuchsia });resources.Add(new ScheduleResource("ID3", "Tim Jones") { ColorScheme = ScheduleResourceColorScheme.Grape });
// Appointments contained in a single day. appts.Add(new Appointment { Start = MakeDateTime(date, 12, 0, 0), End = MakeDateTime(date, 12, 15, 0), Subject = "Daily Meeting 1", Location = "Conference Room 1", ResourceId = resources[0].Id, }); appts.Add(new Appointment { Start = MakeDateTime(date, 13, 0, 0), End = MakeDateTime(date, 13, 15, 0), Subject = "Daily Meeting 2", Location = "Conference Room 2", ResourceId = resources[1].Id, });
appts.Add(new Appointment {
Start = MakeDateTime(date, 13, 0, 0), End = MakeDateTime(date, 13, 15, 0), Subject = "Daily Meeting 2", Location = "Conference Room 2", ResourceId = resources[1].Id, });
I have attached a sample which demonstrates how to do this.
If you require any further assistance on the matter, please let me know.
Sincerely,Teodor TenevSoftware Developer
Thanks a lot for the help. If you have further questions, I ask :).