Bee Eee Blog

Making a UserControl a design time container for controls.

by brian on Jan.04, 2008, under Uncategorized

It turns out that a user control can fairly easily become a container control during design time. In other words being able to put other controls within your user control is fairly straight forward.

The steps are as follows.

add the following to your usings section:

using System.ComponentModel.Design;

and then add the following attribute just above your declared class.

[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))]

public class UserControl1 : System.Windows.Forms.UserControl

{
...
}

Then recompile the project and there it is.

2 comments for this entry:
  1. KIRK


    CheapTabletsOnline.Com. Canadian Health&Care.Best quality drugs.No prescription online pharmacy.Special Internet Prices. High quality drugs. Order pills online

    Buy:Nexium.Mega Hoodia.100% Pure Okinawan Coral Calcium.Human Growth Hormone.Prevacid.Retin-A.Accutane.Zovirax.Prednisolone.Petcam (Metacam) Oral Suspension.Arimidex.Valtrex.Synthroid.Actos.Zyban.Lumigan….

  2. JOEY


    NEW FASHION store. Original designers collection at low prices!!! 20 % TO 70 % OFF. END OF SEASON SALE!!!

    BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...