Name

ParentControlDesigner

Synopsis

This designer extends ControlDesigner to support Control objects that can contain child controls.


public class ParentControlDesigner : ControlDesigner : ISelectionUIHandler, IOleDragClient {

// Public Constructors

   public ParentControlDesigner();

// Protected Instance Properties

   protected virtual Point DefaultControlLocation{get; }

   protected virtual bool DrawGrid{set; get; }

   protected override bool EnableDragRect{get; }

// overrides ControlDesigner

   protected Size GridSize{set; get; }

// Protected Static Methods

   protected static void InvokeCreateTool(ParentControlDesigner toInvoke, System.Drawing.Design.ToolboxItem tool);

// Public Instance Methods

   public virtual bool CanParent(System.Windows.Forms.Control control);

   public virtual bool CanParent(ControlDesigner controlDesigner);

  // overrides ControlDesigner

                  // Protected Instance Methods

   protected void CreateTool(System.Drawing.Design.ToolboxItem tool);

   protected void CreateTool(System.Drawing.Design.ToolboxItem tool, System.Drawing.Point location);

   protected void CreateTool(System.Drawing.Design.ToolboxItem tool, System.Drawing.Rectangle bounds);

   protected virtual IComponent[ ] CreateToolCore(System.Drawing.Design.ToolboxItem tool, int x, 

        int y, int width, int height, bool hasLocation, bool hasSize);

  // overrides ControlDesigner

   protected Control GetControl(object component);

   protected Rectangle GetUpdatedRect(System.Drawing.Rectangle originalRect, System.Drawing.Rectangle dragRect, 

        bool updateSize ...

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.