windowsforms-devexpress-dot-xtrascheduler-dot-schedulerstorage-6540eac7.md
Gets the object which manages resources for appointments.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.dll
NuGet Package : DevExpress.Win.Scheduler
public ResourceStorage Resources { get; }
Public ReadOnly Property Resources As ResourceStorage
| Type | Description |
|---|---|
| ResourceStorage |
A ResourceStorage object which manages resources for appointments.
|
Important
This API is intended to be used with the legacy SchedulerStorage only. Starting with version 18.1, SchedulerStorage and all of its satellite storages are replaced with their updated versions.
Appointments can be associated with resources. A resource is an object which has the following attributes: a unique identifier, caption, color and an image. Consider an application which schedules rooms in a hotel. In this application hotel rooms can be represented as resources which can be occupied by tourists.
The Resources property maintains a collection of resources for appointments. You can load resources from a data source by specifying the DataMember and DataSource properties of the ResourcesStorage object. Or you can populate the collection manually by adding items via the ResourceStorageBase.Items property.
Each item in the collection is an object which exposes the Resource interface.
In bound mode, the XtraScheduler control obtains information on appointments from a database which is specified by the DataMember and DataSource properties of the SchedulerStorage.Appointments object. In this mode resources from the Resources collection can be associated with the appointments via the AppointmentMappingInfo.ResourceId property.
In unbound mode, resources can be associated with appointments manually via the Appointment.ResourceId property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Resources property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-scheduler-handle-fetchappointments-event/CS/Form1.cs#L77
for (int i = 0; i < 100; i++) {
Resource resource = schedulerStorage1.Resources[i % count];
string subjPrefix = resource.Caption + "'s ";
winforms-scheduler-replace-default-command/CS/WindowsFormsApplication1/Form1.cs#L81
for(int i = 0; i < count; i++) {
Resource resource = schedulerStorage1.Resources[i];
string subjPrefix = resource.Caption + "'s ";
winforms-scheduler-customize-appointment-flyout/CS/CustomAppointmentFlyoutExample/DataHelper.cs#L59
for (int i = 0; i < count; i++) {
Resource resource = storage.Resources[i];
string subjPrefix = resource.Caption + "'s ";
winforms-scheduler-print-appointments-using-reports/CS/PrintingViaReports/Form1.cs#L132
{
Resource resource = schedulerStorage1.Resources[i];
string subjPrefix = resource.Caption + "'s ";
winforms-scheduler-handle-fetchappointments-event/VB/Form1.vb#L77
For i As Integer = 0 To 100 - 1
Dim resource As Resource = schedulerStorage1.Resources(i Mod count)
Dim subjPrefix As String = resource.Caption & "'s "
winforms-scheduler-replace-default-command/VB/WindowsFormsApplication1/Form1.vb#L81
For i As Integer = 0 To count - 1
Dim resource As Resource = schedulerStorage1.Resources(i)
Dim subjPrefix As String = resource.Caption & "'s "
winforms-scheduler-customize-appointment-flyout/VB/CustomAppointmentFlyoutExample/DataHelper.vb#L54
For i As Integer = 0 To count - 1
Dim resource As Resource = storage.Resources(i)
Dim subjPrefix As String = resource.Caption & "'s "
winforms-scheduler-print-appointments-using-reports/VB/PrintingViaReports/Form1.vb#L119
For i As Integer = 0 To count - 1
Dim resource As Resource = schedulerStorage1.Resources(i)
Dim subjPrefix As String = resource.Caption & "'s "
See Also