Back to Devexpress

DataSource Class

mobilecontrols-devexpress-dot-xamarinforms-dot-scheduler-e9e6f90f.md

latest3.1 KB
Original Source

DataSource Class

An object that specifies data sources and mappings for the scheduler’s appointments, labels and statuses.

Namespace : DevExpress.XamarinForms.Scheduler

Assembly : DevExpress.XamarinForms.Scheduler.dll

NuGet Package : DevExpress.XamarinForms.Scheduler

Declaration

csharp
public class DataSource :
    SchedulerElement,
    IDataSource

The following members return DataSource objects:

Remarks

To bind a scheduler view to an external data source, set the view’s DataStorage property to a SchedulerDataStorage object and assign a DataSource object to the SchedulerDataStorage.DataSource property.

Use the AppointmentsSource, AppointmentLabelsSource and AppointmentStatusesSource properties to specify data sources for appointments, labels and statuses.

Important

Each binding requires a corresponding mapping. Use the AppointmentMappings, AppointmentLabelMappings and AppointmentStatusMappings properties to map properties of appointment, label and status objects to data source fields.

Example

This example shows how to bind a DayView instance to a data source that stores custom appointment ( MedicalAppointment ) and label ( MedicalAppointmentType ) objects.

  1. Assign a view model object to the content page’s BindingContext property.
  2. Set the DayView.DataStorage property to a SchedulerDataStorage object.
  3. Set the SchedulerDataStorage.DataSource property to a DataSource object and specify the following properties of this object:

Inheritance

Object DevExpress.XamarinForms.Scheduler.Internal.SchedulerElement DataSource

See Also

DataSource Members

DevExpress.XamarinForms.Scheduler Namespace