Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Access Design-Time Support in Windows Forms 

Your custom components and controls are designable, which means they have settings that users can configure with a graphical user interface (UI) at design time. These settings usually affect instances of the component at run time.

If your class implements the IComponent interface, it can participate in a design environment like Visual Studio.

To access the design-time support provided by the .NET Framework, you need to complete the following steps.

To access design-time support

  1. Add a reference to the System.Design assembly.

  2. If you are implementing a UITypeEditor or if your component is interacting with a Toolbox or PropertyGrid control, import the System.Drawing.Design namespace.

using System.Drawing.Design;
  1. If you are implementing a custom design-time experience for your component, import the System.ComponentModel.Design namespace.

using System.ComponentModel.Design;
  1. If you are implementing a custom design-time experience for your Windows Forms control, import the System.Windows.Forms.Design namespace. You can create smart tags or a custom designer for your component with types in this namespace.

using System.Windows.Forms.Design;

See Also

Community Additions

© 2015 Microsoft