public ConvertFrom ( ITypeDescriptorContext context, |
||
context | ITypeDescriptorContext | |
culture | ||
value | object | |
Результат | object |
public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value)
{
string str_value = value as string;
if (str_value != null) {
object o = ConvertFromString (context, culture, str_value);
if (o != null)
return o;
}
return base.ConvertFrom (context, culture, value);
}
protected override PropertyPath ParsePropertyPath(string piece) { var converter = new XamlTypeConverter(parser, target_element, AttributeName, typeof(PropertyPath)); var path = converter.ConvertFrom(piece) as PropertyPath; if (path == null) { Console.Error.WriteLine("Error parsing property path: '{0}'.", piece); return(null); } return(path); }