Version

ListScheduleConnector

The ListScheduleConnector is a non-visual element that is used as a connector between XamScheduleDataManager and a scheduling data source. It creates view model objects ( resources, calendars and activities) that are provided to the schedule data manager. The developer can bind the connector to any set of IEnumerable item sources. If the data is then manipulated in the UI it gets directed to XamScheduleDataManager, which in turns directs the requests to the data connector. The data connector takes the necessary steps to realize the changes back to the underlying item sources.

In XAML:

<ig:ListScheduleDataConnector
  ResourceItemsSource="{Binding resources}"
  ResourceCalendarItemsSource="{Binding calendars}"
  AppointmentItemsSource="{Binding appointments}"
  TaskItemsSource="{Binding tasks}"
  JournalItemsSource="{Binding journals}"/>

In Visual Basic:

Dim dataConnector = New ListScheduleDataConnector()
dataConnector.ResourceItemsSource = resources
dataConnector.ResourceCalendarItemsSource = calendars
dataConnector.AppointmentItemsSource = appointments
dataConnector.TaskItemsSource = tasks
dataConnector.JournalItemsSource = journals

In C#:

var dataConnector = new ListScheduleDataConnector();
dataConnector.ResourceItemsSource = resources;
dataConnector.ResourceCalendarItemsSource = calendars;
dataConnector.AppointmentItemsSource = appointments;
dataConnector.TaskItemsSource = tasks;
dataConnector.JournalItemsSource = journals;

In the sample code above all the collections implement IEnumerable<T> where T is the appropriate type – e.g., resources is IEnumerable<Resource>, appointments are IEnumerable<Appointment>, and so on. The connector can also bind to custom data types and optionally map properties by specifying the appropriate PropertyMapping settings (see related topics).