AppointmentStorage Class

A storage which holds a collection of appointments.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v20.1.dll

Declaration

public class AppointmentStorage :
    PersistentObjectStorageBase<IAppointmentStorageBase, Appointment>
Public Class AppointmentStorage
    Inherits PersistentObjectStorageBase(Of IAppointmentStorageBase, Appointment)

Related API Members

The following members accept/return AppointmentStorage objects:

Remarks

IMPORTANT

You are viewing documentation for the legacy WPF Scheduler control. If you're starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

The AppointmentStorage class represents a storage which holds appointments. The functionality of the AppointmentStorage class can be accessed via the SchedulerStorage.AppointmentStorage property.

To get the collection of appointments, use the AppointmentStorage.Items property.

Connecting the AppointmentStorage object to a data source via the PersistentObjectStorage<T>.DataSource and PersistentObjectStorage<T>.DataMember properties enables bound mode. In this mode, if the PersistentObjectStorage<T>.AutoReload property is set to true, appointments are automatically retrieved from the specified data source, and when data in the data source is modified, the AppointmentStorage object automatically reloads the data. If the AutoReload property is set to false data is not automatically loaded and reloaded from the data source. You should use the SchedulerStorage.RefreshData method to manually reload data in this case.

Use the AppointmentStorage.Mappings property to specify which fields in the bound data source hold an appointment's description, location, type, recurrence information, resource id, etc. The values of these fields will be synchronized with the corresponding properties of Appointment objects.

In bound mode, the AppointmentStorage object synchronizes its data with the data source. If appointments are added, deleted or modified via the AppointmentStorage object, the changes are saved to the data source.

In unbound mode (when the AppointmentStorage object is not bound to a data source) you can use the AppointmentStorage.Items property, to manually populate the storage with appointments.

Examples

This example demonstrates how to get access to the scheduler storage and modify its properties. For this, the SchedulerControl.Storage property is used.

<dxsch:SchedulerControl.Storage>
    <dxsch:SchedulerStorage>

        <dxsch:SchedulerStorage.AppointmentStorage>
            <dxsch:AppointmentStorage>
                <dxsch:AppointmentStorage.Mappings>
                    <dxsch:AppointmentMapping
                        Start="StartTime" 
                        End="EndTime" 
                        AllDay="AllDay"
                        Description="Description"
                        Label="Label"
                        Location="Location"
                        Subject="Subject" 
                        RecurrenceInfo="RecurrenceInfo"
                        ReminderInfo="ReminderInfo"
                        ResourceId="CarId" 
                        Status="Status"
                        Type="EventType"/>
                </dxsch:AppointmentStorage.Mappings>
            </dxsch:AppointmentStorage>
        </dxsch:SchedulerStorage.AppointmentStorage>

        <!--region #ResourceMappings-->
        <dxsch:SchedulerStorage.ResourceStorage>
            <dxsch:ResourceStorage>
                <dxsch:ResourceStorage.Mappings>
                    <dxsch:ResourceMapping Caption="Model" Id="ID" Image="Picture"/>
                </dxsch:ResourceStorage.Mappings>
            </dxsch:ResourceStorage>
        </dxsch:SchedulerStorage.ResourceStorage>
        <!--endregion #ResourceMappings-->

    </dxsch:SchedulerStorage>
</dxsch:SchedulerControl.Storage>

Inheritance

Object
DispatcherObject
DependencyObject
Visual
UIElement
FrameworkElement
DevExpress.Xpf.Core.DXFrameworkElement
DevExpress.Xpf.Scheduler.SchedulerFrameworkElement
DevExpress.Xpf.Scheduler.PersistentObjectStorageBase<IAppointmentStorageBase, Appointment>
AppointmentStorage
See Also