Provides a type converter to convert DateTimeInterval objects to and from other representations.
Definition
Namespace:Telerik.Windows.Controls.ScheduleView.Design
Assembly:Telerik.Windows.Controls.ScheduleView.dll
Syntax:
public class DateTimeIntervalConverter : TypeConverter
Inheritance: objectTypeConverterDateTimeIntervalConverter
Inherited Members
Constructors
public DateTimeIntervalConverter()
Methods
Gets a value indicating whether this converter can convert an object in the given source type to a DateTimeInterval using the specified context.
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
An ITypeDescriptorContext that provides a format context.
sourceTypeTypeA Type that represents the type you want to convert from.
Returns:True if this converter can perform the conversion; otherwise, false.
Overrides:
Returns whether this converter can convert the object to the specified type, using the specified context.
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
An ITypeDescriptorContext that provides a format context.
destinationTypeTypeA Type that represents the type you want to convert to.
Returns:True if this converter can perform the conversion; otherwise, false.
Exceptions:destinationType is null.
destinationType is not a valid value for the target type.
Overrides:
Converts the given object to a DateTimeInterval.
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
An ITypeDescriptorContext that provides a format context.
cultureCultureInfoAn optional CultureInfo. If not supplied, the current culture is assumed.
valueobjectThe object to convert.
Returns:An object that represents the converted value.
Exceptions:The conversion cannot be performed.
value is null.
value contains negative value.
value is not in the correct format. The string should be in format like
this: "{i}d {i}m" where {i} represents an int number.
Given values for Days or Months in value are less
than 0 and MaxValue.
Overrides:
Converts the given object to another type.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
A formatter context.
cultureCultureInfoThe culture into which value will be converted.
The object to convert.
destinationTypeTypeThe type to convert the object to.
Returns:The converted object.
Exceptions:destinationType is null.
Overrides: