public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value) { IWindowsFormsEditorService svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; DBIconClass icon = value as DBIconClass; if (svc != null && icon != null) { using (IconClassForm form = new IconClassForm()) { form.Value = icon; if (svc.ShowDialog(form) == DialogResult.OK) { icon = form.Value; // update object } } } return(icon); // can also replace the wrapper object here }
private void btn_no_icon_Click(object sender, EventArgs e) { Value = new DBIconClass { Class = "", Value = "", Color = "", FixedWidth = false, Rotate = "" }; }