# Resources | WPF Controls | DevExpress Documentation

## Overview

[Appointments](/WPF/119212/controls-and-libraries/scheduler/appointments/appointment) can be assigned to different resources. Consider an example: in a project schedule, appointments can be individual tasks, and resources can be employees.

Resources are represented by [ResourceItem](/WPF/DevExpress.Xpf.Scheduling.ResourceItem) class instances. Use the [SchedulerControl.ResourceItems](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.ResourceItems) property to access the collection of resources.

Resources can be stored in a data source. To use them in a scheduler, bind a data source to the [DataSource.ResourcesSource](/WPF/DevExpress.Xpf.Scheduling.DataSource.ResourcesSource) property and specify the [DataSource.ResourceMappings](/WPF/DevExpress.Xpf.Scheduling.DataSource.ResourceMappings). The [DataSource.ResourceMappings](/WPF/DevExpress.Xpf.Scheduling.DataSource.ResourceMappings) property can be set to either a collection of resource IDs or a string in the XML format.

## Assign Resources to Appointments

To assign an appointment to a particular resource, set the appointment’s [SchedulerItemBase.ResourceId](/WPF/DevExpress.Xpf.Scheduling.SchedulerItemBase.ResourceId) property to the appropriate resource’s [SourceObjectContainer.Id](/WPF/DevExpress.Xpf.Scheduling.SourceObjectContainer.Id) value.

![ResourceNotSharedDiagram](/WPF/images/resourcenotshareddiagram124036.png)

If the [DataSource.ResourceSharing](/WPF/DevExpress.Xpf.Scheduling.DataSource.ResourceSharing) property is set to `true`, an appointment can be assigned to several resources. To assign an appointment to several resources, add their [SourceObjectContainer.Id](/WPF/DevExpress.Xpf.Scheduling.SourceObjectContainer.Id) property values to the appointment’s [SchedulerItemBase.ResourceIds](/WPF/DevExpress.Xpf.Scheduling.SchedulerItemBase.ResourceIds) collection.

The image below demonstrates shared resources.

![ResourceSharedDiagram](/WPF/images/resourceshareddiagram124037.png)

Note

If an appointment doesn’t belong to any particular resource (the [AppointmentItem.ResourceId](/WPF/DevExpress.Xpf.Scheduling.SchedulerItemBase.ResourceId) property is set to the `null`), it is considered assigned to all resources. Enable the [ShowOnlyResourceAppointments](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.ShowOnlyResourceAppointments) option to hide appointments that are not associated with any resource.

## Grouping by Resources

[Views](/WPF/119203/controls-and-libraries/scheduler/views) display resources when the scheduler is grouped by either resources (the [SchedulerControl.GroupType](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.GroupType) is set to the [SchedulerGroupType.Resource](/CoreLibraries/DevExpress.XtraScheduler.SchedulerGroupType) value ) or dates (the [SchedulerControl.GroupType](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.GroupType) is set to the [SchedulerGroupType.Date](/CoreLibraries/DevExpress.XtraScheduler.SchedulerGroupType) value).

Note

If the [ResourceItem.Visible](/WPF/DevExpress.Xpf.Scheduling.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](/WPF/119204/controls-and-libraries/scheduler/views/day-view) when appointments are grouped by a resource…

![WPFScheduler_Resource_GroupByResource](/WPF/images/wpfscheduler_resource_groupbyresource131834.png)

… and a date:

![WPFScheduler_Resource_GroupByDate](/WPF/images/wpfscheduler_resource_groupbydate131833.png)

In the grouped [Timeline View](/WPF/119586/controls-and-libraries/scheduler/views/timeline-view), resources are shown vertically on the left.

![WPFScheduler_Resource_Timeline_GroupByResource](/WPF/images/wpfscheduler_resource_timeline_groupbyresource131835.png)

The [Resource Navigator](/WPF/401575/controls-and-libraries/scheduler/visual-elements/resource-navigator) control is automatically displayed in the scheduler’s bottom right corner when grouping is enabled. The control allows users to scroll through resources and change the number of resources shown on the screen at once.

Use the [SchedulerViewBase.ResourcesPerPage](/WPF/DevExpress.Xpf.Scheduling.SchedulerViewBase.ResourcesPerPage) property of a [view](/WPF/119203/controls-and-libraries/scheduler/views) to specify the number of resources this view displays.

[View Example: Display Custom Text and Images in Resource Headers](https://github.com/DevExpress-Examples/wpf-scheduler-display-custom-text-and-images-in-resource-headers)

## Resource Tree

The [Resource Tree](/WPF/400491/controls-and-libraries/scheduler/visual-elements/resource-tree) allows users to manage the resources. Users can drag groups and resources in the Resource Tree to rearrange them. Users can also check or uncheck checkboxes displayed next to each group and resource to show or hide them.

![](/WPF/images/Scheduler-Resource-Tree.png)

Use the [ResourceTreeControl.Scheduler](/WPF/DevExpress.Xpf.Scheduling.ResourceTreeControl.Scheduler) property to bind a [ResourceTreeControl](/WPF/DevExpress.Xpf.Scheduling.ResourceTreeControl) to a [SchedulerControl](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl).

## Member Table

| Member | Description |
| --- | --- |
| [SchedulerControl.ResourceItems](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.ResourceItems) | Provides access to the collection of resources for appointments. |
| [SchedulerControl.VisibleResources](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.VisibleResources) | Provides access to the collection of currently visible resources. |
| [SchedulerControl.SelectedResource](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.SelectedResource) | Gets or sets the resource currently selected in the scheduler. |
| [SchedulerControl.SelectedResourceSource](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.SelectedResourceSource) | Gets or sets the source object for the selected resource. |
| [SchedulerControl.GetResourceItemBySourceObject](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.GetResourceItemBySourceObject%28System.Object%29) | Returns a resource associated with the specified source object. |

See Also

[Customize Colors](/WPF/400994/controls-and-libraries/scheduler/appearance-customization)