SchedulerControl.SelectedResource Property

Gets or sets the resource related to the currently selected in the SchedulerControl. This is an dependency property.

Namespace: DevExpress.Xpf.Scheduling

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


public ResourceItem SelectedResource { get; set; }

Property Value

Type Description

A ResourceItem object which is the selected resource.


The SelectedResource property is set to an empty resource (i.e., the resource ID is equal to EmptyResourceId.Id value) if the Scheduler’s SchedulerControl.GroupType property is set to None.

Use the SchedulerControl.SelectedResourceSource property to bind the selected resources to a source object.

To determine the selection change, subscribe to the SchedulerControlBase.DependencyPropertyChanged event, as illustrated in the following code snippet.


The complete sample project How to obtain the appointment, resource or time interval selected by an end-user is available in the DevExpress Examples repository.

private void schedulerControl_DependencyPropertyChanged(object sender, DependencyPropertyChangedEventArgs e)
    SchedulerControl scheduler = sender as SchedulerControl;
    if (e.Property == SchedulerControl.SelectedIntervalProperty)
        OutputBox.AppendText(string.Format("SelectedInterval is changed. New value is {0} \r\n", e.NewValue));
    if (e.Property == SchedulerControl.SelectedResourceProperty)
        OutputBox.AppendText(string.Format("SelectedResource is changed. New value is {0} \r\n", ((ResourceItem)e.NewValue).Caption));
See Also