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?
See attached example of what is desired.
Hello Jesse,
You could use our WPF XamSchedule control to achieve something similar to the Outlook Scheduling Assistant. We already have a few samples in our sample browser. If you have our WPF Samples Browser installed you could take a look at the following samples:
- xamSchedule -> Data -> Outlook Calendar View Overview (in the options pane select option "ScheduleViewDay");
- xamSchedule -> Data -> Schedule View Code Behind;
- xamSchedule -> Data -> Schedule View Single Calendar.
We also have some online samples. Open the following link and take a look at Schedule View:
https://ko.infragistics.com/samples/wpf/schedule/overview
I hope this is what you need. Let me know if you have more questions of you need further assistance.
Regards,
Bobby Kulov
Infragistics Developer Support
This actually looks like a much better View.
Can you provide code or doc that shows how to build out the Calendar info/data using code? We currently have an EWS api call to get the Free/Busy times for the supplied email addresses and are populating the WinForm UltraWinSchedule, which is okay... But this is better.
Thanks
I was able to put in the XamScheduleView and populate it with my Outlook Data (see attached), but only by way of setting up the ExchangeScheduleDataConnector as follows...
ExchangeConnector.UseDefaultCredentials = true;
ExchangeConnector.ServerConnectionSettings = new ExchangeServerConnectionSettings();
ExchangeConnector.ServerConnectionSettings.RequestedServerVersion =
Infragistics.Controls.Schedules.ExchangeVersion.Exchange2010_SP1;
ExchangeConnector.ServerConnectionSettings.Url = CurrentEmail.Url;
ExchangeConnector.Connect();
string domain = Environment.UserDomainName;
string user = Environment.UserName;
ScheduleDataManager.CurrentUserId = domain.ToLower() + char.ConvertFromUtf32(92) + user.ToLower();
This works... But I need a way to programmatically build out the Appoitments/Calendar Items by using the response of a EWS call for 5+ users and show all of their calendars together.
Similar to what is shown here: https://ko.infragistics.com/samples/wpf/schedule/schedule-view-multiple-calendars
Actually you could restyle the whole schedule view time slot area in order to make the time slots narrower, change the font size, etc. You need to create a new custom style based on our style for ScheduleViewTimeslotHeader and modify the horizontal padding, change the font size, etc. If you want to customize the header even more, you could take our template, copy it into your project and modify it as you wish.
The templates for Schedule control could be found here:
"C:\Program Files (x86)\Infragistics\2017.1\WPF\DefaultStyles\Schedule\generic.shared.xaml"
Please note that if you are using a specific theme you should take the style template from the appropriate xaml file.
As to combining some calendars, if the CalendarDisplayMode doesn't suit you, you could use the XamScheduleDataManager’s CalendarGroups or the CalendarGroupsOverride of the XamScheduleView control and define the groupings how you want. For more information take a look at our WPF Samples Browser.
Hi Jesse,
Is there a way to condense the horizontal size of so that more time slots (30 mins) can be seen without a Scroll Bar being required?
I don't think it's possible to change the visual size of the time slots. You could only set time slots interval by setting "TimeslotInterval" property of the "XamScheduleView" to show more time intervals in the view. But the number of the time slots visible will be the same.
I also do not see a runtime property that can be set programmatically so that the user groupings are overlaid and tucked up tight to each other on Load. Versus the separate mode shown in my screenshot... I am aware of the ShowCalendarOverlayButton setting, but with this the user has to click to condense the overlaid view. I want it to load this way by default.
You could play with "CalendarDisplayMode" property of the "XamScheduleView". I believe "Mixed" is what you need.
In addition I could suggest installing our WPF Samples Browser which has more that 40 samples demonstrating "XamSchedule" capabilities. There are several samples showing different customization options for the schedule view. WPF Samples Browser could be installed by the same installer you have used to install our controls.
So, I am getting closer working through the infragistics online help doc. I have the following: