This documentation is archived and is not being maintained.

ContainerControlDesigner Class

Provides designer functionality for controls that contain child controls or properties that can be modified at design time.

Namespace:  System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

public class ContainerControlDesigner extends ControlDesigner

The ContainerControlDesigner class provides a base designer class for controls that can be modified on the design surface. This includes controls that contain child controls or editable inner properties. The ContainerControlDesigner provides a single framed region to represent the control, and automatically handles rendering the control at design time.

Apply the ParseChildrenAttribute attribute on the associated control to determine the design-time behavior of the ContainerControlDesigner. Apply the ParseChildrenAttribute settings on the associated control as follows:

  • false to indicate that the ContainerControlDesigner represents the contents of the editable design region as child controls.

  • true to indicate that the ContainerControlDesigner represents the contents of the editable design region as editable inner properties of the control.

Control developers can derive and extend a custom designer from one of several base designers depending on the kind of control that is being developed, as defined in the following list:

  • Controls that allow child controls to be added to it at design time can derive from the ContainerControlDesigner class. For example, the PanelContainerDesigner class is derived from the ContainerControlDesigner class and represents a Panel control on the design surface.

  • Controls that have one or more child controls, and might also have an editable designer region where controls can be added at design time, can derive from the CompositeControlDesigner class.

  • Controls that require custom design-time processing can derive from the base ControlDesigner class.


The ContainerControlDesigner class replaces the obsolete ReadWriteControlDesigner class.

Use the DesignerAttribute attribute to associate a custom designer class together with a custom control implementation. For detailed information about how to use control designers with custom controls, see Walkthrough: Creating a Basic Control Designer for a Web Server Control.

The following code example demonstrates how to derive a designer class from the ContainerControlDesigner class. The example defines a simple control that is derived from the CompositeControl class, and then defines an associated designer, which is derived from the ContainerControlDesigner class. The derived designer class overrides the FrameCaption and FrameStyle properties to customize the frame that is around the editable region of the control on the design surface.

No code example is currently available or this language may not be supported.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0