Back to Devexpress

Resource.Caption Property

corelibraries-devexpress-dot-xtrascheduler-dot-resource-2f00e1c1.md

latest5.8 KB
Original Source

Resource.Caption Property

Gets or sets the resource’s caption.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.dll

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
string Caption { get; set; }
vb
Property Caption As String

Property Value

TypeDescription
String

A String value specifying the resource’s caption.

|

Remarks

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

csharp
protected virtual void UpdateEditedResourceCopy() {
    EditedResourceCopy.Caption = SourceResource.Caption;
    EditedResourceCopy.SetColor(SourceResource.GetColor());

winforms-scheduler-sort-resources/CS/Comparers.cs#L34

csharp
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

csharp
Resource res1 = schedulerDataStorage1.CreateResource(1);
res1.Caption = "First Resource";
res1.ColorValue = "LightSkyBlue";

winforms-scheduler-display-custom-tooltips/CS/Form1.cs#L82

csharp
res.Caption = "Resource1";

winforms-scheduler-handle-fetchappointments-event/CS/Form1.cs#L78

csharp
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

vb
Protected Overridable Sub UpdateEditedResourceCopy()
    EditedResourceCopy.Caption = SourceResource.Caption
    EditedResourceCopy.SetColor(SourceResource.GetColor())

winforms-scheduler-display-custom-tooltips/VB/Form1.vb#L49

vb
e.Title = "Resource"
    e.ToolTip = res.Caption
End If

winforms-scheduler-sort-resources/VB/Comparers.vb#L36

vb
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

vb
Dim res1 As Resource = schedulerDataStorage1.CreateResource(1)
res1.Caption = "First Resource"
res1.ColorValue = "LightSkyBlue"

winforms-scheduler-handle-fetchappointments-event/VB/Form1.vb#L78

vb
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

Resources for Appointments

SchedulerGroupType

Resource Interface

Resource Members

DevExpress.XtraScheduler Namespace