StringToDoubleRangeTypeConverter
StockSharp.Xaml.Charting.Common.Databinding
TypeConverter to allow conversion of a string value to DoubleRange. Used to allow succinct Markup syntax e.g. <NumericAxis VisibleRange="10, 20"/>
Inherits: TypeConverter
Methods
CanConvertFrom
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
result = stringToDoubleRangeTypeConverter.CanConvertFrom(context, sourceType)
Returns whether the type converter can convert an object from the specified type to the type of this converter.
- context
- An object that provides a format context.
- sourceType
- The type you want to convert from.
Returns: true if this converter can perform the conversion; otherwise, false.
ConvertFrom
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
result = stringToDoubleRangeTypeConverter.ConvertFrom(context, culture, value)
Converts from the specified value to the intended conversion type of the converter.
- context
- An object that provides a format context.
- culture
- The CultureInfo to use as the current culture.
- value
- The value to convert to the type of this converter.
Returns: The converted value.