C# Класс Microsoft.Windows.Controls.Ribbon.StringCollectionConverter

A class used to convert a comma separated list into
Наследование: System.ComponentModel.TypeConverter
Показать файл Открыть проект

Открытые методы

Метод Описание
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

Returns whether this converter can convert from a string list to a StringCollection.

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Returns true if this type converter can convert to the given type.

ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object

Converts the given object to a StringCollection.

ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object

TypeConverter method implementation that converts an object of type StringCollection to an InstanceDescriptor or a string. If the source is not a StringCollection or the destination is not a string it forwards the call to TypeConverter.ConvertTo.

Описание методов

CanConvertFrom() публичный Метод

Returns whether this converter can convert from a string list to a StringCollection.
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext An ITypeDescriptorContext that provides the format context.
sourceType System.Type A Type that represents the type you want to convert from.
Результат bool

CanConvertTo() публичный Метод

Returns true if this type converter can convert to the given type.
public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext ITypeDescriptorContext
destinationType System.Type Type to convert to
Результат bool

ConvertFrom() публичный Метод

Converts the given object to a StringCollection.
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext An ITypeDescriptorContext that provides a format context.
culture System.Globalization.CultureInfo The CultureInfo to use as the current culture.
value object The object to convert.
Результат object

ConvertTo() публичный Метод

TypeConverter method implementation that converts an object of type StringCollection to an InstanceDescriptor or a string. If the source is not a StringCollection or the destination is not a string it forwards the call to TypeConverter.ConvertTo.
/// A NotSupportedException is thrown if the example object is null /// or if the destinationType isn't one of the valid destination types. ///
public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object value to convert from
destinationType System.Type Type to convert to
Результат object