StringToLabelValueConverter
StockSharp.Xaml.Charting
TypeConverter to assist in transforming strings to LineAnnotation Labels
继承自: TypeConverter
方法
CanConvertFrom
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
result = stringToLabelValueConverter.CanConvertFrom(context, sourceType)
返回类型转换器是否能够将一个对象从指定的类型转换为该转换器的类型。
- context
- 提供格式上下文的对象。
- sourceType
- 您想要转换的类型 。
返回值: 如果此转换器能够进行转换,则为真;否则,为假。
ConvertFrom
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
result = stringToLabelValueConverter.ConvertFrom(context, culture, value)
从指定的值转换为转换器的预期转换类型。
- context
- 提供格式上下文的对象。
- culture
- CultureInfo作为现文化使用.
- value
- 要转换到此转换器类型的值 。
返回值: 转换值 。