Back to Devexpress

CustomFieldMapping Class

wpf-devexpress-dot-xpf-dot-scheduling-84bcc98e.md

latest6.9 KB
Original Source

CustomFieldMapping Class

Provides information on custom property mapping to appropriate data fields.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public class CustomFieldMapping :
    FreezableBase
vb
Public Class CustomFieldMapping
    Inherits FreezableBase

Remarks

Custom fields allow you to extend the set of properties of a persistent object, such as Appointments, Resources, Labels and Statuses. You can define custom data fields, map them to custom properties of persistent objects and use these user-defined property values in your code.

To create a custom field mapping, perform the following steps:

  • choose a name that is not on the list of the standard persistent object properties (see the Mappings document)
  • create a custom field mapping in XAML by declaring a CustomFieldMapping within the mappings
  • use the selected name to specify the CustomFieldMapping.Name property value

Alternatively, use the CustomFieldMapping.Mapping property to identify mapping for a particular data field.

See the Custom Fields topic for more information.

Example

View Example

xaml
<dxsch:SchedulerControl.DataSource>
    <dxsch:DataSource ResourcesSource="{Binding Doctors}" AppointmentsSource="{Binding Appointments}">
        <dxsch:DataSource.ResourceMappings>
            <dxsch:ResourceMappings Caption="Name" Id="Id"/>
        </dxsch:DataSource.ResourceMappings>
        <dxsch:DataSource.AppointmentMappings>
            <dxsch:AppointmentMappings
                                        Type="Type"
                                        StatusId="StatusId"
                                        Start="StartTime"
                                        Subject="PatientName"
                                        ResourceId="DoctorId"
                                        RecurrenceInfo="RecurrenceInfo"
                                        Reminder="ReminderInfo"
                                        LabelId="CategoryId"
                                        Location="Location"
                                        Id="Id"
                                        End="EndTime"
                                        Description="Notes"
                                        AllDay="AllDay">
                <dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber"/>
                <dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit"/>
            </dxsch:AppointmentMappings>
        </dxsch:DataSource.AppointmentMappings>
    </dxsch:DataSource>

The following code snippets (auto-collected from DevExpress Examples) contain references to the CustomFieldMapping 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#L59

xml
Type="Type">
<dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber" />
<dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit" />

wpf-scheduler-drop-data-from-grid-control-to-create-appointments/CS/DragDropFromGridExample/MainWindow.xaml#L37

xml
Type="Type">
<dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber" />
<dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit" />

wpf-scheduler-specify-custom-edit-and-recurrence-dialogs/CS/CustomMvvmFormWithRecurrenceExample/MainWindow.xaml#L66

xml
Type="Type">
<dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber" />
<dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit" />

wpf-scheduler-handle-customappointmentbackground-event-to-change-appointment-background/CS/CustomAppointmentBackground/MainWindow.xaml#L32

xml
Type="Type">
<dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber" />
<dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit" />

wpf-scheduler-implement-custom-appointment-labels-and-statuses/CS/CustomLabelsAndStatusesExample/MainWindow.xaml#L48

xml
StatusId="PaymentStateId">
<dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber" />
<dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit" />

Inheritance

Object BindableBase DevExpress.Mvvm.Native.FreezableBase CustomFieldMapping

See Also

CustomFieldMapping Members

DevExpress.Xpf.Scheduling Namespace