public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     var editorService = provider.GetService<IWindowsFormsEditorService>();
     if (value != null && editorService != null)
     {
         using (var editor = new BindingEditorView(value.ToString()))
         {
             if (editorService.ShowDialog(editor) == DialogResult.OK)
                 return editor.BindingText;
         }
     }
     return value;
 }
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            var editorService = provider.GetService <IWindowsFormsEditorService>();

            if (value != null && editorService != null)
            {
                using (var editor = new BindingEditorView(value.ToString()))
                {
                    if (editorService.ShowDialog(editor) == DialogResult.OK)
                    {
                        return(editor.BindingText);
                    }
                }
            }
            return(value);
        }