public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType != typeof(MarkupExtension)) { throw new ArgumentException(); } ClassWithMEConverter instance = value as ClassWithMEConverter; if (null == instance) { throw new ArgumentException(); } ClassWithMEExtension extension = new ClassWithMEExtension(); return(extension); }
public override object ProvideValue(IServiceProvider serviceProvider) { ClassWithMEConverter c = new ClassWithMEConverter(); return(c); }