The requested page is not available for the requested platform. You are viewing the content for Default platform.

AppointmentItem Class

The planned event the SchedulerView displays.

Namespace: DevExpress.XamarinForms.Scheduler

Assembly: DevExpress.XamarinForms.Scheduler.dll

Declaration

public class AppointmentItem :
    SourceObjectContainer

Remarks

The Scheduler shows appointment items it stores in the AppointmentItems collection.

The scheduler's DataSource can store statuses in the AppointmentsSource collection. The AppointmentMappings property specifies how to convert source objects to appointments.

Note

The AppointmentItems collection is always synchronous with the scheduler's DataSource when the source is specified.

You can use the DataSource.CreateSourceObject event to create a source object that is assigned to a new item, if the source objects' type does not provide a parameterless constructor.

Appointment Data

The appointment provides the following general properties that configure data it represents:

Appointment valuable parameters

Index

Property

Description

1

Start

Gets or sets the start date and time of the appointment.

2

End

Gets or sets the end date and time of the appointment.

3

LabelId

Gets or sets the identifier of the label object associated with the appointment.

4

Subject

Gets or sets the appointment's subject text.

5

AllDay

Gets or sets whether the appointment lasts the entire day (or several days).

Note that the appointment item's LabelId should be equal to Id of any AppointmentLabelItem from the SchedulerView.LabelItems collection.

Appointment Appearance

The Scheduler's ActiveView specifies how the scheduler displays its appointments:

The table below lists the View properties that manage appointment appearance:

Property

Description

DayViewBase.AppointmentStyle

Gets or sets appearance settings of appointments.

DayViewBase.AppointmentTemplate

Gets or sets a data template that specifies the representation of appointments.

DayViewBase.AllDayAppointmentStyle

Gets or sets appearance settings of all-day appointments.

DayViewBase.AllDayAppointmentTemplate

Gets or sets a data template that specifies the representation of all-day appointments.

MonthView.AppointmentStyle

Gets or sets appearance settings of appointments.

MonthView.AppointmentTemplate

Gets or sets a data template that specifies the Xamarin.Forms.View the Month View uses to show appointments.

Recurrence

Appointment Types

The scheduler can display appointments that occur only once (normal appointments) or repeat several times (recurring appointments), and can generate a series of occurrences by a pattern. If users change an occurrence appointment or delete it, the appointment type will change to changed occurrence or deleted occurrence respectively. The following image summarizes information about appointments and the list the available types:

Appointment Types

  1. Normal Appointment
  2. Occurrence
  3. Changed Occurrence
  4. Deleted Occurrence
Note

Your data source should not contain common occurrences. The Scheduler generates them automatically. But the data source should store deleted occurrences and changed occurrences to be able to restore changes.

The appointment item provides several properties that allow you to determine which appointment type is. The table below lists their values for different appointment types:

Type

IsRecurring

IsBase

IsOccurrence

IsException

Normal

false

true

false

false

Pattern

true

true

false

false

Occurrence

true

false

true

false

ChangedOccurrence

true

false

true

true

DeletedOccurrence

true

false

true

true

Recurrence Info

The pattern appointment's AppointmentItem.RecurrenceInfo property provides data about the periodicity of occurrences generated by the pattern. The property returns instances of classes that implement the IRecurrenceInfo interface. Generally it is RecurrenceInfo objects.

The Scheduler View uses this information to generate occurrence appointments, and the OccurrenceCalculator can compute parameters of occurrences by these information.

Common Properties

All recurrence info properties are split into two groups:

Important

The AppointmentItem.RecurrenceInfo property returns null if AppointmentItem.Type is not Pattern.

View Methods

The Scheduler View provides the following methods that allow you to obtain information about pattern occurrences and exceptions, and about occurrence patterns:

Method

Description

GetPattern(AppointmentItem)

Returns a pattern of the specified occurrence or exception.

GetPattern(Object)

Returns a pattern that utilizes recurrence information with the specified identifier.

GetExceptions(AppointmentItem)

Returns all exceptions to the specified pattern.

GetExceptions(Object)

Returns all exceptions to a pattern that use the recurrence info with the specified identifier.

GetOccurrenceOrException(AppointmentItem, Int32)

Returns an occurrence or exception under the specified recurrence index from the recurring chain the given pattern specifies.

GetOccurrenceOrException(Object, Int32)

Returns an occurrence or exception under the specified recurrence index from the recurring chain which the recurrence info with the given identifier specifies.

GetOccurrencesAndExceptions(AppointmentItem, DateTimeRange)

Returns all occurrences and exceptions to the specified pattern that are within the given date-time interval.

GetOccurrencesAndExceptions(Object, DateTimeRange)

Returns all occurrences and exceptions to a pattern that use the recurrence info with the specified identifier.

Inheritance

Object
DevExpress.XamarinForms.Scheduler.Internal.NotifyPropertyChangedBase
SourceObjectContainer
AppointmentItem
See Also