SchedulerStorage.CreateResource(Object) Method
Creates a new resource with the specified ID.
Namespace: DevExpress.Xpf.Scheduler
Assembly: DevExpress.Xpf.Scheduler.v14.2.dll
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
resource |
Object | An object that specifies a unique resource identifier. |
#Returns
Type | Description |
---|---|
Resource | A Resource object. |
#Remarks
Use the CreateResource method to create a new resource. This method also creates all required custom fields and adds them to the resource's collection of custom fields, available via the Resource.CustomFields property. To add custom fields to the resource manually, use the ResourceStorage.CreateCustomFields method.
The CreateResource method creates a resource via the resource factory (an object which implements the IResourceFactory interface). To change the default resource factory, implement the IResourceFactory interface and specify this object as the resource factory for the scheduler storage via the SchedulerStorage.SetResourceFactory method.
After a resource has been created, it should be added to the scheduler storage to persist and display it in the scheduler control (the ResourceStorage.Add method).