public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { if (VPLUtil.delegateGetComponentList != null) { IComponent ic = context.Instance as IComponent; if (ic != null) { IList <IComponentID> cs = VPLUtil.delegateGetComponentList(ic); if (cs != null && cs.Count > 0) { ValueList list = new ValueList(edSvc, cs); edSvc.DropDownControl(list); if (list.MadeSelection) { value = list.Selection as IComponentID; } } } } } } return(value); }