wpf-devexpress-dot-xpf-dot-scheduling-dot-resourceitem-1e45fc69.md
Gets or sets the resource caption.
Namespace : DevExpress.Xpf.Scheduling
Assembly : DevExpress.Xpf.Scheduling.v25.2.dll
NuGet Package : DevExpress.Wpf.Scheduling
public string Caption { get; set; }
Public Property Caption As String
| Type | Description |
|---|---|
| String |
A string value indicating the resource caption.
|
Use the Caption property to define a resource caption displayed in the view’s resource header (if the grouping by date or resource is specified). The Caption is also used in the AppointmentResourceEdit and AppointmentResourcesEdit to identify a resource to end-users.
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.
wpf-scheduler-specify-custom-work-time-intervals/CS/CustomWorkTimeExample/MainWindow.xaml#L33
<dxsch:SchedulerControl.ResourceItems>
<dxsch:ResourceItem Caption="One" Id="1" />
<dxsch:ResourceItem Caption="Two" Id="2" />
{
OutputBox.AppendText(string.Format("SelectedResource is changed. New value is {0} \r\n", ((ResourceItem)e.NewValue).Caption));
OutputBox.ScrollToEnd();
If e.Property Is SchedulerControl.SelectedResourceProperty Then
Me.OutputBox.AppendText(String.Format("SelectedResource is changed. New value is {0} " & Microsoft.VisualBasic.Constants.vbCrLf, CType(e.NewValue, ResourceItem).Caption))
Me.OutputBox.ScrollToEnd()
See Also