Skip to main content
A newer version of this page is available. .

Resources

  • 2 minutes to read

Overview

Resources are entities associated with appointments. Resources ResourceItem class instances and they allow end-users to group and sort appointments. A scheduler resources’ collection is available using the SchedulerControl.ResourceItems property.

Resources can be stored in the data source. To use them in a scheduler, bind a data source to the DataSource.ResourcesSource property and specify the DataSource.ResourceMappings. The DataSource.ResourceMappings property can be set to either a collection of resource IDs or a string in the XML format.

Resource Sharing

Resource sharing means that an appointment is associated with several resources. To enable resource sharing, set the DataSource.ResourceSharing property to true. Resources can be:

Note

If an appointment doesn’t belong to any particular resource (the AppointmentItem.ResourceId property is set to the EmptyResourceId), it is considered assigned to all resources. Hence, this appointment is shown for all resources.

Grouping by Resources

A resource becomes visible in the scheduler grouped by either resources (the SchedulerControl.GroupType is set to the SchedulerGroupType.Resource value ) or dates (the SchedulerControl.GroupType is set to the SchedulerGroupType.Date value).

Note

If the ResourceItem.Visible property of any resource is set to false, and the scheduler is grouped by resources or dates, all appointments that belong to this resource are hidden.

The following images demonstrate the Day View when appointments are grouped by a resource…

WPFScheduler_Resource_GroupByResource

… and a date:

WPFScheduler_Resource_GroupByDate

In the grouped Timeline View, resources are shown vertically on the left.

WPFScheduler_Resource_Timeline_GroupByResource

The Resource Navigator control is automatically displayed in the scheduler’s bottom right corner when grouping is enabled. The control allows end-users to scroll through resources and change the number of resources shown on the screen at once.

Use each View‘s SchedulerViewBase.ResourcesPerPage property to specify the number of resources it shows on a screen.

Member Table

Member Description
SchedulerControl.ResourceItems Provides access to the collection of resources for appointments.
SchedulerControl.VisibleResources Provides access to the collection of currently visible resources.
SchedulerControl.SelectedResource Gets or sets the resource currently selected in the scheduler.
SchedulerControl.SelectedResourceSource Gets or sets the source object for the selected resource.
SchedulerControl.GetResourceItemBySourceObject Returns a resource associated with the specified source object.