Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Mapping Class

The property mapping that specifies source object’s property that supply data to a scheduler item’s property.

Namespace: DevExpress.Maui.Scheduler

Assembly: DevExpress.Maui.Scheduler.dll

NuGet Package: DevExpress.Maui.Scheduler

#Declaration

C#
[TypeConverter(typeof(MappingConverter))]
public class Mapping :
    FreezableBase

#Remarks

Note that you can specify this property’s value using one of the following approaches:

  • By a source object’s property name. The label mapping creates the property mapping without converters:

    <dxs:AppointmentLabelMappings Caption="Caption">
    
  • Via the markup extension. You can specify all mapping settings in this case:

    <dxs:AppointmentLabelMappings Caption="{dxs:Mapping FieldName=Caption, Converter={StaticResource labelCaptionConverter}">
    
  • Assigning a new Mapping object to the property.

    <dxs:AppointmentMappings.RecurrenceInfo>
        <dxs:Mapping 
            FieldName="Recurrence" 
            Converter="{StaticResource recurrenceConverter}"
            ConversionBehavior="InPlaceOfMapping"/>
    <dxs:AppointmentMappings.RecurrenceInfo>
    

#Example

This example configures mappings that specify the properties of source objects and how they provide values for scheduler items’ properties.

<ContentPage.Resources>
    <views:ModelRecurrenceToRecurrenceInfoConverter x:Key="recurrenceConverter"/>
    <views:MedicalAppointmentTypeToAppointmentTypeConverter x:Key="appointmentTypeConverter"/>
</ContentPage.Resources>
<!-- Some markup is skipped. -->
<dxs:DataSource AppointmentsSource="{Binding MedicalAppointments}">
    <dxs:DataSource.AppointmentMappings>
        <dxs:AppointmentMappings 
            Id="Id" 
            Subject="Subject"
            End="EndTime" 
            Start="StartTime" 
            LabelId="LabelId"
            Type="{dxs:Mapping FieldName=Type, Converter={StaticResource appointmentTypeConverter}, ConversionBehavior=InPlaceOfMapping}">
            <!-- The extension above configures the mapping like the following. -->
            <dxs:AppointmentMappings.RecurrenceInfo>
                <dxs:Mapping 
                    FieldName="Recurrence" 
                    Converter="{StaticResource recurrenceConverter}"
                    ConversionBehavior="InPlaceOfMapping"/>
            <dxs:AppointmentMappings.RecurrenceInfo>
    </dxs:DataSource.AppointmentMappings>
<dxs:DataSource

The code above uses the classes and members below:

Symbol

Description

Mapping

The property mapping that specifies source object’s property that supply data to a scheduler item’s property.

MappingExtension

Implements a XAML markup extension that allows you to create a Mapping object.

#Inheritance

System.Object
DevExpress.Maui.Scheduler.Internal.BindableBase
DevExpress.Maui.Scheduler.Internal.FreezableBase
Mapping
See Also