コード例 #1
0
        protected Control GetControl(object component)
        {
            IComponent comp = component as IComponent;

            if (comp != null && comp.Site != null)
            {
                IDesignerHost host = comp.Site.GetService(typeof(IDesignerHost)) as IDesignerHost;
                if (host != null)
                {
                    ControlDesigner designer = host.GetDesigner(comp) as ControlDesigner;
                    if (designer != null)
                    {
                        return(designer.Control);
                    }
                }
            }
            return(null);
        }
コード例 #2
0
 public ControlDesignerAccessibleObject(ControlDesigner designer, Control control)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 public bool CanParent(ControlDesigner designer)
 {
     return(CanParent(designer.Control));
 }