corelibraries-devexpress-dot-xtrascheduler-dot-resource-2f00e1c1.md
Gets or sets the resource’s caption.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
string Caption { get; set; }
Property Caption As String
| Type | Description |
|---|---|
| String |
A String value specifying the resource’s caption.
|
Use the Caption property to specify a caption for the current resource. The caption is displayed in the view’s resource header if the view is grouped by date or resource. The Caption value is used in resource editors to identify a resource to the end-user.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Caption 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-manage-resources-runtime/CS/SchedulerResourcesManagement/ResourceForm.cs#L48
protected virtual void UpdateEditedResourceCopy() {
EditedResourceCopy.Caption = SourceResource.Caption;
EditedResourceCopy.SetColor(SourceResource.GetColor());
winforms-scheduler-sort-resources/CS/Comparers.cs#L34
protected override int CompareResources(Resource xRes, Resource yRes) {
return String.Compare(xRes.Caption, yRes.Caption);
}
winforms-scheduler-bind-to-xpo/CS/XPO_XtraScheduler_Simple_Example/Form1.cs#L29
Resource res1 = schedulerDataStorage1.CreateResource(1);
res1.Caption = "First Resource";
res1.ColorValue = "LightSkyBlue";
winforms-scheduler-display-custom-tooltips/CS/Form1.cs#L82
res.Caption = "Resource1";
winforms-scheduler-handle-fetchappointments-event/CS/Form1.cs#L78
Resource resource = schedulerStorage1.Resources[i % count];
string subjPrefix = resource.Caption + "'s ";
eventList.Add(CreateEvent(eventList, subjPrefix + "meeting", resource.Id, 2, 5));
winforms-scheduler-manage-resources-runtime/VB/SchedulerResourcesManagement/ResourceForm.vb#L66
Protected Overridable Sub UpdateEditedResourceCopy()
EditedResourceCopy.Caption = SourceResource.Caption
EditedResourceCopy.SetColor(SourceResource.GetColor())
winforms-scheduler-display-custom-tooltips/VB/Form1.vb#L49
e.Title = "Resource"
e.ToolTip = res.Caption
End If
winforms-scheduler-sort-resources/VB/Comparers.vb#L36
Protected Overrides Function CompareResources(ByVal xRes As Resource, ByVal yRes As Resource) As Integer
Return String.Compare(xRes.Caption, yRes.Caption)
End Function
winforms-scheduler-bind-to-xpo/VB/XPO_XtraScheduler_Simple_Example/Form1.vb#L29
Dim res1 As Resource = schedulerDataStorage1.CreateResource(1)
res1.Caption = "First Resource"
res1.ColorValue = "LightSkyBlue"
winforms-scheduler-handle-fetchappointments-event/VB/Form1.vb#L78
Dim resource As Resource = schedulerStorage1.Resources(i Mod count)
Dim subjPrefix As String = resource.Caption & "'s "
eventList.Add(CreateEvent(eventList, subjPrefix & "meeting", resource.Id, 2, 5))
See Also