Hi,
I'm trying to find a way to force the XamSchedule to display the calendar's header, even if there's only one calendar displayed. The attached video will explain.
I've tried to look on the forum, but couldn't find what I was looking for. I've read something that might be related to my problem here: http://www.infragistics.com/community/forums/t/56426.aspx. Especially the following part:
"If you have only set the CurrentUserId and are not using the CalendarGroups or you have set the CalendarDisplayMode to Merged then there is no "header" as you are just showing a single set of timeslots."
I think the attached video shows a "merged" CalendarDisplayMode. I've tried to use the "Separate" CalendarDisplayMode instead and that does the trick. The header remains visible for the last calendar displayed.
But I want to keep the Merged CalendarDisplayMode and still be able to view the last calendar's header.
Is that possible?
Regards
Samuel
Hello,
Thank you for choosing Infragistics.
I have been looking into your issue and I have prepared a sample application for you to test. I have set the DataContext property of the Window to an instance of the ScheduleResources class which I have used to get all the necessary properties and information for creating the XamScheduleDataManager and the XamDayView. I have set the CalendarDisplayMode property of the XamDayView to Merged as you have described. In code-behind I have got the ScheduleStackPanel of the XamDayView that contains the CalendarHeaderHorizontal instances and I have set its Visibility property to Visible. This way all headers prior to applying the style in the XamDayView resources are visible. When the style is applied all CalendarHeaderHorizontal instances have their Visibility property set to Collapsed except for the one with the Header property set to All.
If you require any further assistance on this matter, please do not hesitate to ask.
It did the trick. Thank you!
Thank you for your feedback. I am glad to know that I was able help you achieve the functionality you were looking for. I believe this thread can help other people looking for a similar solution.
I still need a bit of assistance on this issue. The solution provided works only for a certain dates range.
If I have a date range greater than or equal to 2 weeks, the header disappears again.
Can you shed some light on this?
Thank you
Hello Samuel,
Thank you for the feedback you have provided.
I have modified the sample application I had provided you earlier and attached it for you to test it. I have replaced the XamDayView with a XamMonthView and I have used the same settings and DataManager for displaying the calendars. I have removed the setter that was previously collapsing all the CalendarHeaderHorizontal objects initially so you can close them manually as you have in your sample gif picture. This should help you achieve the functionality you are looking for by keeping the Header of the last remaining calendar.
Ok I've got it working.
I was using a XamOutlookCalendarView. I've had to redefine the template of XamMonthView and change the visibility of the GroupHeadersPanel from inside the template.
It used to be:
Visibility="{TemplateBinding CalendarHeaderAreaVisibilityResolved}"
It's now
Visibility="Visible"
Thank you for your help
Hello, Thank you for the feedback and the code-snippet you have provided. I am glad to know you were able to achieve the desired functionality. I believe this thread can help other people looking for a similar solution. If you require any further assistance on this matter, please do not hesitate to ask.