Class DateTimeIntervalConverter
Provides a type converter to convert DateTimeInterval objects to and from other representations.
Inheritance
Namespace: Telerik.Windows.Controls.ScheduleView.Design
Assembly: Telerik.Windows.Controls.ScheduleView.dll
Syntax
public class DateTimeIntervalConverter : TypeConverter
Constructors
DateTimeIntervalConverter()
Declaration
public DateTimeIntervalConverter()
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Gets a value indicating whether this converter can convert an object in the given source type to a DateTimeInterval using the specified context.
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
System.ComponentModel.ITypeDescriptorContext
context
An System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Type
sourceType
A System.Type that represents the type you want to convert from. |
Returns
System.Boolean
True if this converter can perform the conversion; otherwise, false. |
CanConvertTo(ITypeDescriptorContext, Type)
Returns whether this converter can convert the object to the specified type, using the specified context.
Declaration
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters
System.ComponentModel.ITypeDescriptorContext
context
An System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Type
destinationType
A System.Type that represents the type you want to convert to. |
Returns
System.Boolean
True if this converter can perform the conversion; otherwise, false. |
Exceptions
System.ArgumentNullException
|
System.FormatException
|
ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)
Converts the given object to a DateTimeInterval.
Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
System.ComponentModel.ITypeDescriptorContext
context
An System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Globalization.CultureInfo
culture
An optional System.Globalization.CultureInfo. If not supplied, the current culture is assumed. |
System.Object
value
The System.Object to convert. |
Returns
System.Object
An System.Object that represents the converted value. |
Exceptions
System.NotSupportedException
The conversion cannot be performed. |
System.ArgumentNullException
|
System.ArgumentOutOfRangeException
|
System.FormatException
|
System.OverflowException
Given values for Days or Months in |
ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)
Converts the given object to another type.
Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
System.ComponentModel.ITypeDescriptorContext
context
A formatter context. |
System.Globalization.CultureInfo
culture
The culture into which |
System.Object
value
The object to convert. |
System.Type
destinationType
The type to convert the object to. |
Returns
System.Object
The converted object. |
Exceptions
System.ArgumentNullException
|