Back to Devexpress

DataSource.ResourcesSource Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-datasource-e81f5ee5.md

latest6.1 KB
Original Source

DataSource.ResourcesSource Property

Gets or sets a collection of objects containing resource information. This is a dependency property.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public object ResourcesSource { get; set; }
vb
Public Property ResourcesSource As Object

Property Value

TypeDescription
Object

A collection of objects which contain resource information.

|

Remarks

The ResourcesSource property supports the MVVM design pattern. See the MVVM Framework topic to learn more.

Important

Resource mappings are required. Use the DataSource.ResourceMappings property to specify mappings.

Example

View Example

xaml
<dxsch:SchedulerControl.DataSource>
    <dxsch:DataSource AppointmentsSource="{Binding Appointments}" ResourcesSource="{Binding Resources}">
        <dxsch:DataSource.AppointmentMappings>
            <dxsch:AppointmentMappings Start="StartTime" 
                                       End="EndTime" 
                                       AllDay="AllDay" 
                                       Subject="Subject" 
                                       Id="ID" 
                                       Description="Description" 
                                       LabelId="Label" 
                                       Location="Location" 
                                       RecurrenceInfo="RecurrenceInfo" 
                                       Reminder="ReminderInfo" 
                                       ResourceId="CarId" 
                                       StatusId="Status" 
                                       Type="EventType" />
        </dxsch:DataSource.AppointmentMappings>
        <dxsch:DataSource.ResourceMappings>
            <dxsch:ResourceMappings Id="ID" 
                                    Caption="Model" />
        </dxsch:DataSource.ResourceMappings>
    </dxsch:DataSource>
</dxsch:SchedulerControl.DataSource>
<dxsch:DayView ResourcesPerPage="3" />
<dxsch:MonthView/>

The following code snippets (auto-collected from DevExpress Examples) contain references to the ResourcesSource 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-use-scheduler-report-to-print-and-export-appointments/CS/PrintingExample/MainWindow.xaml#L44

xml
<dxsch:SchedulerControl.DataSource>
    <dxsch:DataSource AppointmentsSource="{Binding Appointments}" ResourcesSource="{Binding Doctors}">
        <dxsch:DataSource.AppointmentMappings>

wpf-scheduler-generate-time-scales-from-view-model-collection/CS/WpfSchedulerTimelineScalesTemplate/MainWindow.xaml#L43

xml
<dxsch:SchedulerControl.DataSource>
    <dxsch:DataSource AppointmentsSource="{Binding Appointments}" ResourcesSource="{Binding Calendars}">
        <dxsch:DataSource.AppointmentMappings>

wpf-scheduler-highlight-time-intervals/CS/SchedulerCellTemplate/MainWindow.xaml#L32

xml
<dxsch:SchedulerControl.DataSource>
    <dxsch:DataSource AppointmentsSource="{Binding Appointments}" ResourcesSource="{Binding Calendars}"
                      TimeRegionsSource="{Binding TimeRegions}"

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

xml
AppointmentsSource="{Binding SportEvents}"
ResourcesSource="{Binding SportChannels}">
<dxsch:DataSource.AppointmentMappings>

wpf-scheduler-apply-end-user-restrictions/CS/WpfApplication1/MainWindow.xaml#L24

xml
<dxsch:SchedulerControl.DataSource>
    <dxsch:DataSource AppointmentsSource="{Binding Appointments}" ResourcesSource="{Binding Resources}">
        <dxsch:DataSource.AppointmentMappings>

See Also

Resources

Mappings

How to: Bind Scheduler to Data using Entity Framework

DataSource Class

DataSource Members

DevExpress.Xpf.Scheduling Namespace