corelibraries-devexpress-dot-xtrascheduler-dot-appointmentmappinginfo-89eceb8c.md
Gets or sets a value converter for the Appointment.Start property.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
[Browsable(false)]
public ISchedulerMappingConverter StartConverter { get; set; }
<Browsable(False)>
Public Property StartConverter As ISchedulerMappingConverter
| Type | Description |
|---|---|
| ISchedulerMappingConverter |
An object that implements the ISchedulerMappingConverter interface to translate the data between the property and the data source field.
|
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-scheduler-mapping-converters
class MappingConverterStart : ISchedulerMappingConverter {
public object Convert(object obj, Type targetType, object parameter) {
return DateTime.ParseExact(obj.ToString(), "s", System.Globalization.DateTimeFormatInfo.InvariantInfo);
}
public object ConvertBack(object obj, Type targetType, object parameter) {
return ((DateTime)obj).ToString("s");
}
}
Friend Class MappingConverterStart
Implements ISchedulerMappingConverter
Public Function Convert(ByVal obj As Object, ByVal targetType As Type, ByVal parameter As Object) As Object Implements ISchedulerMappingConverter.Convert
Return Date.ParseExact(obj.ToString(), "s", System.Globalization.DateTimeFormatInfo.InvariantInfo)
End Function
Public Function ConvertBack(ByVal obj As Object, ByVal targetType As Type, ByVal parameter As Object) As Object Implements ISchedulerMappingConverter.ConvertBack
Return DirectCast(obj, Date).ToString("s")
End Function
End Class
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the StartConverter 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.
winforms-scheduler-mapping-converters/CS/SchedulerMappingConverterExample/Form1.cs#L71
schedulerStorage1.Appointments.Mappings.ReminderInfoConversionBehavior = MappingConversionBehavior.BetweenMappingAndProperty;
schedulerStorage1.Appointments.Mappings.StartConverter = new MappingConverterStart();
schedulerStorage1.Appointments.Mappings.StartConversionBehavior = MappingConversionBehavior.InPlaceOfMapping;
winforms-scheduler-mapping-converters/VB/SchedulerMappingConverterExample/Form1.vb#L73
schedulerStorage1.Appointments.Mappings.ReminderInfoConversionBehavior = MappingConversionBehavior.BetweenMappingAndProperty
schedulerStorage1.Appointments.Mappings.StartConverter = New MappingConverterStart()
schedulerStorage1.Appointments.Mappings.StartConversionBehavior = MappingConversionBehavior.InPlaceOfMapping
See Also