I am currently making EWS calls and am able to get back the Availability / Busy times with start/end DateTime values for multiple people. I now need a way to display this within a UI. Ideally I would show something very similar to the Scheduling Assistant that is seen within Outlook. I understand that no such control exists.
Is there a way using C# to programmatically build the data that is shown on WPF XamOutlookCalendarView?
Is there a WinForms control that can be populated with C# code to look like that attached screenshot?
See attached screenshot
Hi Jesse,
You can get something pretty close to this by using the UltraDayView and creating Owners in your CalendarInfo. I am attaching a small sample project here that demonstrates this.
This is very good, thank you...
Can you help me with the following:
- The first column will be named Proposed Appointment, can I just set the Unassigned.Owner.Key/Name properties for this?
- In the Unassigned calendar create a single entry (do not allow any additional entries) that the user can drag up/down/resize to find a time that works with the owners schedule listed in the remaining calendars.
- As the user drags the appointment within the unassigned calendar can we sync a selection/highlight within the remaining calendars - So that there is a visual comparison on how any given block of time fits on the remaining calendars?
- Make the remaining calendars read-only
Jesse Jones said:- The first column will be named Proposed Appointment, can I just set the Unassigned.Owner.Key/Name properties for this?
Yes, you could use either Name or Key. Key is generally what you use in code and Name is for when you want to display some other name to the user.
Jesse Jones said:- In the Unassigned calendar create a single entry (do not allow any additional entries) that the user can drag up/down/resize to find a time that works with the owners schedule listed in the remaining calendars.
I'm not really sure what you are asking here. There's no built-in functionality for this kind trial-and-error scheduling. It might be possible by handling a whole bunch of events, but since I don't know exactly what behavior you want, I'm not sure how to assist you with this. It would probably be tremendously complicated.
Jesse Jones said:- As the user drags the appointment within the unassigned calendar can we sync a selection/highlight within the remaining calendars - So that there is a visual comparison on how any given block of time fits on the remaining calendars?
Again, there is no built-in way to do this. You might be able to use a DrawFilter to draw something in the other days that matches what you are doing in the Unassigned owner, but this would be very complicated and it's probably not something we could handle through support. That would be more like a consulting job.
Jesse Jones said:- Make the remaining calendars read-only
You mean the remaining owners? I think you answered this in your second post. I don't know if PropertyChanged is really a good way to go here. I would probably approach this by looking at the events of the UltraDayView and the CalendarInfo. You could handle events like BeforeDisplayAppointmentDialog, BeforeAppointmentEdited, BeforeAppointmentResized, etc. and cancel the event based on the owner.
Jesse Jones said:Style Question - I only see a BarColor that can be set which only sets the left most border color of the appointment block... How can I set the entire color of the appointment block?
Use the Appearance property on the Appointment for this. So in my sample, you could do something like:
appt = calendarInfo.Appointments.Add(startDateTime, "Appt2");
appt.Owner = ownerB;appt.BarColor = Color.Red;appt.Appearance.BackColor = Color.Purple;appt.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.None;