Back to Devexpress

ResourceItem.Caption Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-resourceitem-1e45fc69.md

latest3.5 KB
Original Source

ResourceItem.Caption Property

Gets or sets the resource caption.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

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

Property Value

TypeDescription
String

A string value indicating the resource caption.

|

Remarks

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

xml
<dxsch:SchedulerControl.ResourceItems>
    <dxsch:ResourceItem Caption="One" Id="1" />
    <dxsch:ResourceItem Caption="Two" Id="2" />

wpf-scheduler-obtain-selected-appointment-resource-and-time-interval/CS/DXSchedulerSelection/MainWindow.xaml.cs#L27

csharp
{
    OutputBox.AppendText(string.Format("SelectedResource is changed. New value is {0} \r\n", ((ResourceItem)e.NewValue).Caption));
    OutputBox.ScrollToEnd();

wpf-scheduler-obtain-selected-appointment-resource-and-time-interval/VB/DXSchedulerSelection/MainWindow.xaml.vb#L25

vb
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

ResourceItem Class

ResourceItem Members

DevExpress.Xpf.Scheduling Namespace