public void EnterXmlSource()
 {
     try
     {
         EditorServiceContext.EditValue(_designer, base.Component, "XmlSource");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
        public static object EditValue(ComponentDesigner designer, object objectToChange, string propName)
        {
            PropertyDescriptor   prop    = TypeDescriptor.GetProperties(objectToChange)[propName];
            EditorServiceContext context = new EditorServiceContext(designer, prop);

            if (prop == null)
            {
                throw new Exception("propName: " + propName);
            }
            object obj2 = prop.GetValue(objectToChange);
            object obj3 = (prop.GetEditor(typeof(UITypeEditor)) as UITypeEditor).EditValue(context, context, obj2);

            if (obj3 != obj2)
            {
                try
                {
                    prop.SetValue(objectToChange, obj3);
                }
                catch (CheckoutException)
                {
                }
            }
            return(obj3);
        }