Back to Devexpress

ResourceMappings Class

wpf-devexpress-dot-xpf-dot-scheduling-04a0d749.md

latest6.1 KB
Original Source

ResourceMappings Class

Provides information on the resource properties’ mapping to data fields.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public class ResourceMappings :
    MappingsBase
vb
Public Class ResourceMappings
    Inherits MappingsBase

The following members return ResourceMappings objects:

Remarks

The ResourceMappings class contains a set of properties whose names are similar to the persistent properties declared within the ResourceItem class. If the SchedulerControl is bound to a data source using its DataSource.ResourcesSource property, the ResourceMappings class properties allow the corresponding ResourceItem properties to be bound to appropriate fields in the data source.

Access the ResourceMappings object using the DataSource.ResourceMappings property.

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 ResourceMappings class.

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#L65

xml
<dxsch:DataSource.ResourceMappings>
    <dxsch:ResourceMappings Caption="Name" Id="Id" />
</dxsch:DataSource.ResourceMappings>

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

xml
<dxsch:DataSource.ResourceMappings>
    <dxsch:ResourceMappings Id="Id" Caption="Name"/>
</dxsch:DataSource.ResourceMappings>

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

xml
<dxsch:DataSource.ResourceMappings>
    <dxsch:ResourceMappings Id="Id" Caption="Name"/>
</dxsch:DataSource.ResourceMappings>

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

xml
<dxsch:DataSource.ResourceMappings>
    <dxsch:ResourceMappings Caption="Caption" Id="Id" />
</dxsch:DataSource.ResourceMappings>

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

xml
<dxsch:DataSource.ResourceMappings>
    <dxsch:ResourceMappings Caption="Caption" Id="Id"/>
</dxsch:DataSource.ResourceMappings>

Inheritance

Object BindableBase DevExpress.Mvvm.Native.FreezableBase MappingsBase ResourceMappings

See Also

ResourceMappings Members

DevExpress.Xpf.Scheduling Namespace