Resource Interface
Defines a common attribute which can be assigned to appointments to group them.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v22.1.Core.dll
Declaration
public interface Resource :
IPersistentObject,
IBatchUpdateable,
IDisposable,
IIdProvider
Public Interface Resource
Inherits IPersistentObject,
IBatchUpdateable,
IDisposable,
IIdProvider
Related API Members
The following members return Resource objects:
Related API Members
The following members return Resource objects:
Related API Members
The following members return Resource objects:
Remarks
The Resource represents a common attribute which can be assigned to appointments to group them and facilitate the task of managing the time of resources and people groups under a single View. An appointment can be associated with a resource by setting the appointment’s Appointment.ResourceId property to the required resource’s unique identifier.
In addition to the members inherited from the PersistentObject class, the Resource class provides an interface enabling a resource instance’s caption (Resource.Caption), color (Resource.Color), unique identifier (PersistentObject.Id) and visibility (Resource.Visible) to be specified.
Use the SchedulerStorageBase.CreateResource method to create a resource. Add it to the persistent storage using the ResourceStorageBase.Add method. Resources are maintained within the ResourceStorageBase.Items collection of a ResourceStorage object which is referenced by the SchedulerStorage.Resources property of the SchedulerStorage component.
An instance of the Resource can be accessed via the ResourceStorageBase.Item property of the ResourceStorage object.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Resource interface.
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.
void CurrentScheduler_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) {
if(e.Data.GetDataPresent(typeof(DevExpress.XtraScheduler.Resource))) {
how-to-sort-resources-e3124/CS/Comparers.cs#L7
namespace SchedulerSortResources {
public abstract class ResourceBaseComparer : IComparer<Resource>, IComparer {
#region IComparer Members
scheduler-how-to-sort-resources-e4487/CS/DevExpressMvcApplication1/Helpers/ResourceComparer.cs#L9
public abstract class ResourceBaseComparer : IComparer<Resource>, IComparer {
#region IComparer Members
if(dropHitInfo.HitTest == DevExpress.XtraScheduler.Drawing.SchedulerHitTest.ResourceHeader) {
Resource targetResource = dropHitInfo.ViewInfo.Resource;
Resource sourceResource = downHitInfo.ViewInfo.Resource;
public partial class ResourceForm : Form {
private readonly Resource sourceResource = null;
private readonly Resource editedResourceCopy = ResourceEmpty.Resource;
Private Sub CurrentScheduler_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs)
If e.Data.GetDataPresent(GetType(DevExpress.XtraScheduler.Resource)) Then
how-to-sort-resources-e3124/VB/Comparers.vb#L8
Public MustInherit Class ResourceBaseComparer
Implements IComparer(Of Resource), IComparer
scheduler-how-to-sort-resources-e4487/VB/DevExpressMvcApplication1/Helpers/ResourceComparer.vb#L10
Public MustInherit Class ResourceBaseComparer
Implements IComparer(Of Resource), IComparer
If dropHitInfo.HitTest = DevExpress.XtraScheduler.Drawing.SchedulerHitTest.ResourceHeader Then
Dim targetResource As Resource = dropHitInfo.ViewInfo.Resource
Dim sourceResource As Resource = downHitInfo.ViewInfo.Resource
Private ReadOnly sourceResource_Renamed As Resource = Nothing