Class TimeFormatConverter
Converts from a string value to an ITimeFormat instance. Converts "Short"
to ShortTimeFormat, "Long" to LongTimeFormat and any other strings to
CustomTimeFormat.
Inheritance
System.Object
System.ComponentModel.TypeConverter
TimeFormatConverter
Inherited Members
System.ComponentModel.TypeConverter.CanConvertFrom(System.Type)
System.ComponentModel.TypeConverter.CanConvertTo(System.Type)
System.ComponentModel.TypeConverter.ConvertFrom(System.Object)
System.ComponentModel.TypeConverter.ConvertFromInvariantString(System.ComponentModel.ITypeDescriptorContext, System.String)
System.ComponentModel.TypeConverter.ConvertFromInvariantString(System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.ComponentModel.ITypeDescriptorContext, System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.String)
System.ComponentModel.TypeConverter.ConvertTo(System.Object, System.Type)
System.ComponentModel.TypeConverter.ConvertToInvariantString(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.ConvertToInvariantString(System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.Object)
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionary)
System.ComponentModel.TypeConverter.CreateInstance(System.ComponentModel.ITypeDescriptorContext, System.Collections.IDictionary)
System.ComponentModel.TypeConverter.GetConvertFromException(System.Object)
System.ComponentModel.TypeConverter.GetConvertToException(System.Object, System.Type)
System.ComponentModel.TypeConverter.GetCreateInstanceSupported()
System.ComponentModel.TypeConverter.GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext, System.Object, System.Attribute[])
System.ComponentModel.TypeConverter.GetProperties(System.Object)
System.ComponentModel.TypeConverter.GetPropertiesSupported()
System.ComponentModel.TypeConverter.GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValues()
System.ComponentModel.TypeConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValuesExclusive()
System.ComponentModel.TypeConverter.GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValuesSupported()
System.ComponentModel.TypeConverter.GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.IsValid(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.IsValid(System.Object)
System.ComponentModel.TypeConverter.SortProperties(System.ComponentModel.PropertyDescriptorCollection, System.String[])
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: OpenSilver.Controls.Input.Toolkit.dll
public class TimeFormatConverter : TypeConverter
Methods
|
Improve this Doc
View Source
CanConvertFrom(ITypeDescriptorContext, Type)
Determines whether this instance can convert from the specified type
descriptor context.
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
typeDescriptorContext |
The type descriptor context.
|
System.Type |
sourceType |
Type of the source.
|
Returns
Type |
Description |
System.Boolean |
True if this instance can convert from the specified
type descriptor context; otherwise, false .
|
Overrides
System.ComponentModel.TypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)
|
Improve this Doc
View Source
CanConvertTo(ITypeDescriptorContext, Type)
Determines whether this instance can convert to the specified type
descriptor context.
Declaration
public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
typeDescriptorContext |
The type descriptor context.
|
System.Type |
destinationType |
Type of the destination.
|
Returns
Type |
Description |
System.Boolean |
True if this instance can convert to the specified type
descriptor context; otherwise, false .
|
Overrides
System.ComponentModel.TypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)
|
Improve this Doc
View Source
ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)
Converts instances of type string to an instance of type ITimeFormat.
Declaration
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
typeDescriptorContext |
The type descriptor context.
|
System.Globalization.CultureInfo |
cultureInfo |
The culture used to convert.
|
System.Object |
source |
The string that is converted.
|
Returns
Type |
Description |
System.Object |
An instance of ITimeFormat that is the value of the conversion.
|
Overrides
System.ComponentModel.TypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)
|
Improve this Doc
View Source
ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)
Converts an known instance of type ITimeFormat to a string.
Declaration
public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
typeDescriptorContext |
The type descriptor context.
|
System.Globalization.CultureInfo |
cultureInfo |
The culture used to convert.
|
System.Object |
value |
The value that is being converted to a specified type.
|
System.Type |
destinationType |
The type to convert the value to.
|
Returns
Type |
Description |
System.Object |
The value of the conversion to the specified type.
|
Overrides
System.ComponentModel.TypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)