Skip to main content
A newer version of this page is available. .

MappingExtension Class

Implements a XAML markup extension in order to create a Mapping object.

Namespace: DevExpress.XamarinForms.Scheduler

Assembly: DevExpress.XamarinForms.Scheduler.dll

Declaration

public class MappingExtension :
    IMarkupExtension

Example

This example demonstrates how to configure 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 provides data to a scheduler item’s property.

MappingExtension

Implements a XAML markup extension in order to create a Mapping object.

Implements

Xamarin.Forms.Xaml.IMarkupExtension

Inheritance

Object
MappingExtension
See Also