Hi
I'm trying to follow the help guide 'Creating a XamSchedule in XAML'.
As you can see, I'm not getting the "Amanda" in the CalendarHeaderVertical. Code follows below.
Also, I take it there's no way to make the "0830"... "0900"... "0930" smaller, so I can fit this control in without having to scroll horizontally?
--------
XAML
---------
<ig:XamScheduleView x:Name="scheduleView" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="2" ShowWorkingHoursOnly="True" CurrentTimeIndicatorVisibility="Collapsed" ShowCalendarCloseButton="True" ShowCalendarOverlayButton="True" CalendarDisplayMode="Overlay">
<ig:XamScheduleView.DataManager> <ig:XamScheduleDataManager x:Name="dataManager">
<ig:XamScheduleDataManager.Settings> <ig:ScheduleSettings WorkDays="Monday, Tuesday, Wednesday, Thursday, Friday"> <ig:ScheduleSettings.WorkingHours> <ig:WorkingHoursCollection> <ig:TimeRange Start="08:30" End="17:00" /> </ig:WorkingHoursCollection> </ig:ScheduleSettings.WorkingHours> </ig:ScheduleSettings> </ig:XamScheduleDataManager.Settings>
<ig:XamScheduleDataManager.CalendarGroups> <ig:CalendarGroup InitialCalendarIds="own1[cal1]" /> </ig:XamScheduleDataManager.CalendarGroups>
<ig:XamScheduleDataManager.DataConnector> <ig:ListScheduleDataConnector x:Name="dataConnector"> </ig:ListScheduleDataConnector> </ig:XamScheduleDataManager.DataConnector>
</ig:XamScheduleDataManager> </ig:XamScheduleView.DataManager> </ig:XamScheduleView>
CODE
var resources = new ObservableCollection<Resource>(); resources.Add(new Resource { Id = "own1", Name = "Amanda" });
var calendars = new ObservableCollection<ResourceCalendar>(); calendars.Add(new ResourceCalendar { Id = "cal1", OwningResourceId = "own1" });
var appointments = new ObservableCollection<Appointment>(); appointments.Add(new Appointment { Id = "t1", OwningCalendarId = "cal1", OwningResourceId = "own1", Subject = "Appointment 1", Description = "My first appointment", // Convert the date to universal time, because a time zone is not set // in this snippet Start = DateTime.Today.AddHours(9).AddMinutes(12).ToUniversalTime(), End = DateTime.Today.AddHours(11).AddMinutes(42).ToUniversalTime() }); appointments.Add(new Appointment { Id = "t2", OwningCalendarId = "cal1", OwningResourceId = "own1", Subject = "Appointment 2", Description = "My second appointment", // Convert the date to universal time, because a time zone is not set // in this snippet Start = DateTime.Today.AddHours(10).AddMinutes(12).ToUniversalTime(), End = DateTime.Today.AddHours(11).AddMinutes(42).ToUniversalTime() });
dataConnector.ResourceItemsSource = resources; dataConnector.ResourceCalendarItemsSource = calendars; dataConnector.AppointmentItemsSource = appointments;
Thank you for the prompt response.
grapentin said: As you can see, I'm not getting the "Amanda" in the CalendarHeaderVertical. Code follows below.
grapentin said:Also, I take it there's no way to make the "0830"... "0900"... "0930" smaller, so I can fit this control in without having to scroll horizontally?