<ig:XamScheduleDataManager>
<ig:XamScheduleDataManager.CalendarGroups>
<ig:CalendarGroup InitialCalendarIds="own1,own2[cal1]"
InitialSelectedCalendarId="own2[cal1]" />
<ig:CalendarGroup InitialCalendarIds="own2[cal0],own3" />
</ig:XamScheduleDataManager.CalendarGroups>
</ig:XamScheduleDataManager>
The InitialCalendarIds property accepts a comma delimited string with the calendar identifiers where a calendar is specified in the following format – OwnerId[ CalendarId]. When a CalendarId is omitted the primary calendar of the OwningResource is displayed. The InitialSelectedCalendarId property takes the ID of a single ResourceCalendar in the same format and that is used to identify the calendar that will be selected within the group initially.
The following listing demonstrates is how the developer can specify the same example in code.
Dim calGroup1 = New CalendarGroup() With { _
Key .InitialCalendarIds = "own1, own2[cal1]", _
Key .InitialSelectedCalendarId = "own2[cal1]" _
}
Dim calGroup2 = New CalendarGroup() With { _
Key .InitialCalendarIds = "own2[cal0], own3" _
}
dataManager.CalendarGroups.Add(calGroup1)
dataManager.CalendarGroups.Add(calGroup2)
var calGroup1 = new CalendarGroup {
InitialCalendarIds = "own1, own2[cal1]",
InitialSelectedCalendarId = "own2[cal1]"
};
var calGroup2 = new CalendarGroup {
InitialCalendarIds = "own2[cal0], own3"
};
dataManager.CalendarGroups.Add(calGroup1);
dataManager.CalendarGroups.Add(calGroup2);
After the calendars are grouped together, the developer can choose the way the groups are displayed. All the views in xamSchedule support CalendarDisplay modes. This feature is controlled by the property CalendarDisplayMode that can be set to one of the following values:
-
Overlay – if there is more than 1 visible ResourceCalendar in the control then each one will be displayed with a tab header. If there is more than one visible ResourceCalendar in a CalendarGroup then the activities associated with that calendar are displayed as normal but activities associated with all other ResourceCalendars in the group will appear muted.
-
Separate – every visible ResourceCalendar is displayed in its own group with a header that identifies the calendar.
-
Merged – there are no tabs or headers. All activities from all the visible ResourceCalendars are shown together.
By default, the CalendarDisplayMode is set to null and each control will choose a default value that mimics the behavior found in Outlook. XamMonthView and xamDayView default to “Overlay” and xamScheduleView defaults to “Separate”.
The following images show how each control appears when the CalendarDisplayMode is set to “Overlay” and there are two CalendarGroups defined with each containing two visible ResourceCalendars.