See Also: IDesigner Members
The System.ComponentModel.Design.IDesigner interface provides an interface through which you can implement basic services for a designer. A designer can modify the behavior of a component at design time, and may provide its own services and behavior. A designer is only active at design-time, and must be associated with a type of component using a System.ComponentModel.DesignerAttribute in order to be loaded when a component of the associated type is created at design time.
The System.ComponentModel.Design.IDesigner interface provides methods and properties that you can implement in order to provide custom behavior at design time.
Implement the IDesigner.Initialize(System.ComponentModel.IComponent) method of a designer to perform actions when a component is created. This can be useful if a component should have a special configuration at design-time, or if its configuration should change depending on conditions that the designer can determine.
A designer can provide menu commands on the shortcut menu that is displayed when a user right-clicks a component or control in the design-time environment. You can implement the IDesigner.Verbs property to define a get accessor that returns a System.ComponentModel.Design.DesignerVerbCollection containing the System.ComponentModel.Design.DesignerVerb objects for generating menu commands.
A designer for a component that appears in the component tray can perform a default action when the component is double-clicked. Implement the IDesigner.DoDefaultAction method to specify the behavior to perform when the component is double-clicked.
A designer can also use the available design-time services to perform a variety of tasks, including surveying the current design-time environment for components and their properties, reading and setting the values of properties of components, managing the toolbox, managing selected components, or displaying a user interface that can be used to configure values or to apply further processing.
To implement a designer for a control that can be sited on a form, you can inherit from the System.Windows.Forms.Design.ControlDesigner class. Controls whose associated designer does not derive from System.Windows.Forms.Design.ControlDesigner are displayed in the component tray. The System.ComponentModel.Design.ComponentDesigner and System.Windows.Forms.Design.ControlDesigner classes implement the System.ComponentModel.Design.IDesigner interface and provide additional design-time support that may be of use to authors of designers. For more information, see the reference documentation for these classes.
For an overview of creating design components, please see Extending Design-Time Support.