maui-devexpress-dot-maui-dot-scheduler-cd46ee88.md
The planned event a scheduler view displays.
Namespace : DevExpress.Maui.Scheduler
Assembly : DevExpress.Maui.Scheduler.dll
NuGet Package : DevExpress.Maui.Scheduler
public class AppointmentItem :
SourceObjectContainer
The following members return AppointmentItem objects:
Show 11 links
A scheduler view displays appointment items stored in the AppointmentItems collection of the SchedulerDataStorage object assigned to the view’s DataStorage property.
To bind a scheduler view to an external data source of appointments, set the SchedulerDataStorage.DataSource property to a DataSource object and bind the DataSource.AppointmentsSource property to a collection of appointment objects. The DataSource.AppointmentMappings property specifies how to convert source objects to appointments.
Note
The AppointmentItems collection is always synchronous with the scheduler storage’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.
The appointment provides the following general properties that configure data it represents:
|
Index
|
Property
|
Description
| | --- | --- | --- | |
1
|
|
Gets or sets the start date and time of the appointment.
| |
2
|
|
Gets or sets the end date and time of the appointment.
| |
3
|
|
Gets or sets the identifier of the label object associated with the appointment.
| |
4
|
|
Gets or sets the appointment’s subject text.
| |
5
|
|
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 SchedulerDataStorage.LabelItems collection.
Appointments are displayed differently depending on the scheduler view type:
Day-Based Views: (1) - Appointment; (2) - All-Day Appointment
Month View: (3) - Appointment
The table below lists scheduler view properties that manage appointment appearance:
|
Property
|
Description
| | --- | --- | |
DayViewBase.AppointmentAppearance
|
Gets or sets appearance settings of appointments. This is a bindable property.
| |
DayViewBase.AppointmentTemplate
|
Gets or sets a data template that specifies the representation of appointments. This is a bindable property.
| |
DayViewBase.AllDayAppointmentAppearance
|
Gets or sets the appearance settings of all-day appointments. This is a bindable property.
| |
DayViewBase.AllDayAppointmentTemplate
|
Gets or sets a data template that is used to display all-day appointments. This is a bindable property.
| |
MonthView.AppointmentAppearance
|
Gets or sets the apperance properties of the month view’s appointment. This is a bindable property.
| |
|
Gets or sets a data template that specifies the View the Month View uses to show appointments. This is a bindable property.
|
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:
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 what the appointment type is. The table below lists their values for different appointment types:
|
|
|
|
|
| | --- | --- | --- | --- | --- | |
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
|
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.
A scheduler view uses this information to generate occurrence appointments, and the OccurrenceCalculator can compute parameters of occurrences with this information.
All recurrence info properties are split into two groups:
Properties that manage how long occurrences appear. The Range property manages which properties from this group the calculator uses to generate occurrences:
Properties that manage how often occurrences appear. The Type property manages which properties from this group the calculator uses to generate occurrences:
Important
The AppointmentItem.RecurrenceInfo property returns null if AppointmentItem.Type is not Pattern.
A scheduler view’s data storage provides the following methods that allow you to obtain information about pattern occurrences and exceptions, and about occurrence patterns:
|
Method
|
Description
| | --- | --- | |
|
Returns a pattern of the specified occurrence or exception.
| |
|
Returns a pattern that utilizes recurrence information with the specified identifier.
| |
GetExceptions(AppointmentItem)
|
Returns all exceptions to the specified pattern.
| |
|
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.
|
System.Object DevExpress.Maui.Scheduler.Internal.NotifyPropertyChangedBase SourceObjectContainer AppointmentItem
YieldIfNotNull<AppointmentItem>()
See Also