corelibraries-devexpress-dot-xtrascheduler-aca06ef7.md
Enables you to apply custom logic to a mapping.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
public interface ISchedulerMappingConverter
Public Interface ISchedulerMappingConverter
The following members return ISchedulerMappingConverter objects:
Show 33 links
You can associate a mapping converter with a mapping. Create a class that implements the ISchedulerMappingConverter interface, instantiate it and assign it to a related property as described in the Mapping Converters document.
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
See Also